Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Converting Date
Message
 
À
13/06/2008 11:32:30
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Divers
Thread ID:
01323855
Message ID:
01323871
Vues:
13
>Why did that work? Style 112 is in the format YYMMDD, not YYYYMMDD. Is it because you put a value of 8 for the varchar?
>
>>SELECT CONVERT(varchar(8),@Test,112)

As you see there is two styles:
1st column is Without century, second one is with century:

So with 12 you will get YYMMDD with 112 you'll get YYYYMMDD
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform