Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to convert a string to date ?
Message
De
19/04/2001 08:35:51
 
 
À
18/04/2001 15:32:48
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
00496935
Message ID:
00497203
Vues:
14
As Sylvain mentioned you could use the CONVERT() or CAST() funciton. SQL Server is also capable of implicitly converting a string to a datetime datatype.

You should also checkout the SET DATEFORMAT connection setting. It could affect the converstion. For the best results, format the string as YYYYMMDD. SQL Server will always recognize this format and convert it properly.

-Mike
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform