SQL date formatting

Source: Internet
Author: User
Frequently used: Explain convert (varchar (100), getdate (), 20) -- 2010-12-29 09: 08: 36 convert (varchar (100), getdate (), 21) -- 09:08:36. 380 convert (varchar (100), getdate (), 23) -- 2010-12-29convert (varchar (100), getdate (), 24) -- 09: 08: 36 convert (varchar (100), getdate (), 25) -- 09:08:36. 380 convert (varchar (100), getdate (), 102) -- 2010.12.29convert (Varchar (100), getdate (), 111) -- 2010/12/29 convert (varchar (100), getdate (), 112) -- 20101229 convert (varchar (100), getdate (), 114) -- 09: 08: 36: 380 convert (varchar (100), getdate (), 120) -- 2010-12-29 09: 08: 36 convert (varchar (100 ), getdate (), 121) -- 09:08:36. 380 more: -------------------------------------------------------------- convert (varchar (100), getdate (), 0) -- 12 29 2010 9: 08 amconvert (varchar (100), getdate (), 1) -- 12/29/10 convert (varchar (100), getdate (), 2) -- 10.12.29convert (varchar (100), getdate (), 3) -- 29/12/10 convert (varchar (100), getdate (), 4) -- 29.12.10convert (varchar (100), getdate (), 5) -- 29-12-10convert (varchar (100), getdate (), 6) -- 29 12 10 convert (varchar (100), getdate (), 7) -- 12 29, 10 convert (varchar (100), getdate (), 8) -- 09: 08: 36 convert (varchar (100), getdate (), 9 )-- 12 29 2010 9: 08: 36: 380 amconvert (varchar (100), getdate (), 10) -- 12-29-10convert (varchar (100), getdate (), 11) -- 10/12/29 convert (varchar (100), getdate (), 12) -- 060516 convert (varchar (100), getdate (), 13) -- 29 12 2010 09: 08: 36: 380 convert (varchar (100), getdate (), 14) -- 09: 08: 36: 380 convert (varchar (100), getdate (), 20) -- 09: 08: 36 convert (varchar (100), getdate (), 21) -- 09:08:36. 380con Vert (varchar (100), getdate (), 22) -- 12/29/10 9:08:36 amconvert (varchar (100), getdate (), 23) -- 2010-12-29convert (varchar (100 ), getdate (), 24) -- 09: 08: 36 convert (varchar (100), getdate (), 25) -- 09:08:36. 380 convert (varchar (100), getdate (), 100) -- 12 29 2010 9: 08 amconvert (varchar (100), getdate (), 101) -- 12/29/2010 convert (varchar (100), getdate (), 102) -- 2010.12.29convert (varchar (100), getdate (), 103) -- 29/12/2010 convert (varchar (100), getdate (), 104) -- 29.12.2010convert (varchar (100), getdate (), 105) -- 29-12-2010convert (varchar (100), getdate (), 106) -- 29 12 2010 convert (varchar (100), getdate (), 107) -- 12 29,201 0 convert (varchar (100), getdate (), 108) -- 09: 08: 36 convert (varchar (100), getdate (), 109) -- 12 29 2010 9: 08: 36: 380 amconvert (varchar (100), getdate (), 110) -- 12-29-2010convert (varchar (100), getdate (), 111) -- 2010/12/29 convert (varchar (100), getdate (), 112) -- 20101229 convert (varchar (100), getdate (), 113) -- 29 12 2010 09: 08: 36: 380 convert (varchar (100), getdate (), 114) -- 09: 08: 36: 380 convert (varchar (100 ), getdate (), 120) -- 2010-12-29 09: 08: 36 convert (varchar (100), getdate (), 121) -- 09:08:36. 380 convert (varchar (100), getdate (), 126) -- 2010-12-29t09: 08: 36.380 convert (varchar (10 0), getdate (), 130) -- 23 ???? 1432 9: 08: 36: 380 amconvert (varchar (100), getdate (), 131) -- 23/01/1432 9: 08: 36: 20.am

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.