Will not get stuck in date formatting again

Posted on Leave a commentPosted in Database, Development, T-SQL

You’ve all been there, you’ve all banged your head against the monitor just because you could not remember that code for the specific date-format you needed. I know I have. I SQL 2012 this is no longer such a headake to remember all those codes – JAY! Ex. from SQL 2008 R2 and older: SELECT CONVERT(VARCHAR(10), GETDATE(), 105) AS [DD-MM-YYYY] –Italian SELECT CONVERT(VARCHAR(10), GETDATE(), 104) AS [DD.MM.YYYY] –German SELECT CONVERT(VARCHAR(10), GETDATE(), 101) AS [MM/DD/YYYY] –USA And with the codes specific for each country format needed.   Now in SQL 2012 we are all free to try to memorize those codes […]