Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Converting Date
Message
 
To
13/06/2008 11:32:30
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Miscellaneous
Thread ID:
01323855
Message ID:
01323871
Views:
11
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform