Information générale
Titre:
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?
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement