Posted By

rtipton on 05/15/09


Tagged

date Conversions


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

heinz1959


Converting Dates in SQL Server


 / Published in: SQL
 

  1. SELECT
  2. GETDATE() AS DefaultFormat,
  3. CONVERT(nvarchar(30), GETDATE(), 101) AS US,
  4. CONVERT(nvarchar(30), GETDATE(), 103) AS UK,
  5. CONVERT(nvarchar(30), GETDATE(), 111) AS Japan,
  6. CONVERT(nvarchar(30), GETDATE(), 104) AS German,
  7. CONVERT(nvarchar(30), GETDATE(), 112) AS ISO,
  8. CONVERT(nvarchar(30), GETDATE(), 109) AS Date_with_Milliseconds

Report this snippet  

You need to login to post a comment.