SQL Server datetime formats

Source: Internet
Author: User

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 pm
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,200 8
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
yymmdd (no spaces)
13 or 113 dd mon yyyy hh: mm: SS: Mmm (24 h) 15 Jan 2008 17: 37: 13: 163
hh: MI: SS: Mmm (24 h) 17: 37: 52: 407
20 or 120 yyyy-mm-dd hh: MI: SS (24 h) 17:38:20
21 or 121 yyyy-mm-dd hh: MI: Ss. mmm (24 h) 17:38:44. 867
yyyy-mm-dd thh: mm: Ss. mmm (no spaces) 2008-01-15t17: 39: 12.193
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.