SQL Server DateTime Formats
DateTime Formats/Styles
The list of styles that can be applied are:
SQL Style ID | SQL Style | Example |
0 or 100 | mon dd yyyy hh:miAM (or PM) | Jan 15 2008 5:44PM |
101 | mm/dd/yy | 01/15/2008 |
102 | yy.mm.dd | 2008.01.15 |
103 | dd/mm/yy | 15/01/2008 |
104 | dd.mm.yy | 15.01.2008 |
105 | dd-mm-yy | 15-01-2008 |
106 | dd mon yy | 15 Jan 2008 |
107 | Mon dd, yy | Jan 15, 2008 |
108 | hh:mm:ss | 17:42:33 |
9 or 109 | mon dd yyyy hh:mi:ss:mmmAM (or PM) | Jan 15 2008 5:42:09:953PM |
110 | mm-dd-yy | 01-15-2008 |
111 | yy/mm/dd | 2008/01/15 |
112 | yymmdd (no spaces) | 20080115 |
13 or 113 | dd mon yyyy hh:mm:ss:mmm(24h) | 15 Jan 2008 17:37:13:163 |
114 | hh:mi:ss:mmm(24h) | 17:37:52:407 |
20 or 120 | yyyy-mm-dd hh:mi:ss(24h) | 2008-01-15 17:38:20 |
21 or 121 | yyyy-mm-dd hh:mi:ss.mmm(24h) | 2008-01-15 17:38:44.867 |
126 | yyyy-mm-dd Thh:mm:ss.mmm(no spaces) | 2008-01-15T17:39:12.193 |