January 14, 2002 at 8:42 am
While inserting date into a SQL Server table from a form in Visual Basic, what to do to insert only time without date
January 14, 2002 at 9:34 am
If you pass the date as a string with no time components and use a convert function in the inset statement, it will have no time value.
Thom Pantazi
January 15, 2002 at 12:04 am
one more way is use
Format(date,"dd-mmm-yyyy") (function in VB)
one more example....
Format(form1.dtpSDate.Value, "dd-mmm-yyyy")
January 15, 2002 at 5:31 am
Both are valid, just depends on where is the best place. If you ALWAYS want the value to just be the time portion, I'd say do in a procedure. If sometimes yes and sometimes no, keep the proc inserting the date however is passed, do the formatting in the app.
Andy
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy