Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to Insert Date And Time Values
Message
From
09/08/2001 17:26:31
Jason Dalio
Northern Interior Regional Health Board
Prince George, British Columbia, Canada
 
 
To
All
General information
Forum:
Visual Basic
Category:
SQL Server
Title:
How to Insert Date And Time Values
Miscellaneous
Thread ID:
00542038
Message ID:
00542038
Views:
58
I am looking to send the current date and time of a transaction to 2 separate fields in SQL Server 7.0 from Visual Basic 6.0 using ADO. I have a Transfer_Date and Transfer_Time field in my SQL table both set to a datetime type. I can't seem to figure out what syntax to use though. I have been trying:

Format(Date, "dd/mmm/yyyy") for the Transfer_Date field and it works but when I use Format(Time, "hh:mm:ss AMPM") it saves it with an incorrect date (01/01/1900 - someone told me this was SQLs default date here once I think) and the time stamp. I only want the time, no date. Help?
Next
Reply
Map
View

Click here to load this message in the networking platform