SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Be Wary of Date Formatting in T-SQL

Today’s public service announcement is a reminder to be wary of date formatting in SQL Server. On a recent mailing list discussion, one person demonstrated the following code (which I’ve adapted for this post): SET LANGUAGE 'us_english'; GO DECLARE @StartDate DATETIME = '2017-07-12'; SELECT @StartDate; GO DECLARE @StartDate DATE = '2017-07-12'; SELECT @StartDate; GO DECLARE[...]

The post Be Wary of Date Formatting in T-SQL appeared first on Born SQL.

Born SQL with Randolph West

Randolph West solves technology problems with a focus on SQL Server and C#. He is a Microsoft Data Platform MVP who has worked with SQL Server since the late 1990s. When not consulting, he can be seen acting on the stage and screen or doing voices for independent video games.

Comments

Leave a comment on the original post [bornsql.ca, opens in a new window]

Loading comments...