Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Convert from char to datetime
Message
De
05/01/2005 09:55:29
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00974367
Message ID:
00974386
Vues:
16
Daniel
Try:
lcDateStr = '20041223' 
ldDateTime = CTOT( SUBSTR( lcDateStr, 5, 2) + "/" + RIGHT( lcDateStr, 2) + "/" + LEFT( lcDateStr, 4))
Terry

>Hi All,
>
>Can anyone help me with the conversion of '20041223' string to datetime data type in the following format 12/31/2004 ?
>
>TIA,
>Daniel M.
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform