Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to Insert Date And Time Values
Message
De
09/08/2001 17:26:31
Jason Dalio
Northern Interior Regional Health Board
Prince George, Colombie Britannique, Canada
 
 
À
Tous
Information générale
Forum:
Visual Basic
Catégorie:
SQL Server
Titre:
How to Insert Date And Time Values
Divers
Thread ID:
00542038
Message ID:
00542038
Vues:
60
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
Fil
Voir

Click here to load this message in the networking platform