Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Date format
Message
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Miscellaneous
Thread ID:
01666138
Message ID:
01666140
Views:
37
>Hi,
>
>Could you please explain why (where is the rule?) the SQL Server always looks at the date in the following format: 'yyyyMMdd' (no matter the date format of the country where the SQL Server is installed).
>
>That is, the following code:
>
>DECLARE @SomeDate AS SmallDateTime
>SELECT @SomeDate = '20190204'
>SELECT @SomeDate
>
>
>always returns February 4th of 2019 (and NOT April 2nd).
>
>TIA

Read this blog and the article referenced in there

http://sqlblog.karaszi.com/is-yyyy-mm-dd-always-treated-as-year-month-date/
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform