General information
Title:
How to Insert Date And Time Values
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only