rss
twitter
facebook

Home

SQL Server Date Formats

Standard Date Formats
Standard SQL Statement
Default SELECT CONVERT(VARCHAR(20), GETDATE(), 100)
USA SELECT CONVERT(VARCHAR(8), GETDATE(), 1) AS [MM/DD/YY]
USA SELECT CONVERT(VARCHAR(10), GETDATE(), 101) AS [MM/DD/YYYY]
ANSI SELECT CONVERT(VARCHAR(8), GETDATE(), 2) AS [YY.MM.DD]
ANSI SELECT CONVERT(VARCHAR(10), GETDATE(), 102) AS [YYYY.MM.DD]
British/French SELECT CONVERT(VARCHAR(8), GETDATE(), 3) AS [DD/MM/YY]
British/French SELECT CONVERT(VARCHAR(10), GETDATE(), 103) AS [DD/MM/YYYY]
German SELECT CONVERT(VARCHAR(8), GETDATE(), 4) AS [DD.MM.YY]
German SELECT CONVERT(VARCHAR(10), GETDATE(), 104) AS [DD.MM.YYYY]




code by http://www.sql-server-helper.com/tips/date-formats.aspx

0 comentários:

 
Powered by Blogger