SQL Server date Format function Convert

Source: Internet
Author: User
Tags getdate

Select CONVERT (varchar), GETDATE (), 0): 10:57am
Select CONVERT (varchar), GETDATE (), 1): 05/16/15
Select CONVERT (varchar), GETDATE (), 2): 15.05.16
Select CONVERT (varchar), GETDATE (), 3): 16/05/15
Select CONVERT (varchar), GETDATE (), 4): 16.05.15
Select CONVERT (varchar), GETDATE (), 5): 16-05-15
Select CONVERT (varchar), GETDATE (), 6): 16 05 15
Select CONVERT (varchar), GETDATE (), 7): 05 16, 15
Select CONVERT (varchar), GETDATE (), 8): 10:57:46
Select CONVERT (varchar), GETDATE (), 9): 10:57:46:827am
Select CONVERT (varchar), GETDATE (), 10): 05-16-15
Select CONVERT (varchar), GETDATE (), 11): 15/05/16
Select CONVERT (varchar), GETDATE (), 12): 150516
Select CONVERT (varchar), GETDATE (), 13): 16 05 2015 10:57:46:937
Select CONVERT (varchar), GETDATE (), 14): 10:57:46:967
Select CONVERT (varchar), GETDATE (), 20): 2015-05-16 10:57:47
Select CONVERT (varchar), GETDATE (), 21): 2015-05-16 10:57:47.157
Select CONVERT (varchar), GETDATE (): 05/16/15 10:57:47 AM
Select CONVERT (varchar), GETDATE (), 23): 2015-05-16
Select CONVERT (varchar), GETDATE (), 24): 10:57:47
Select CONVERT (varchar), GETDATE (), 25): 2015-05-16 10:57:47.250
Select CONVERT (varchar), GETDATE (), (+): 10:57am
Select CONVERT (varchar), GETDATE (), 101): 05/16/2015
Select CONVERT (varchar), GETDATE (), 102): 2015.05.16
Select CONVERT (varchar), GETDATE (), 103): 16/05/2015
Select CONVERT (varchar), GETDATE (), 104): 16.05.2015
Select CONVERT (varchar), GETDATE (), 105): 16-05-2015
Select CONVERT (varchar), GETDATE (), 115): 16 05 2015
Select CONVERT (varchar), GETDATE (), 107): 05 16, 2015
Select CONVERT (varchar), GETDATE (), 108): 10:57:49
Select CONVERT (varchar), GETDATE (), 109): 10:57:49:437am
Select CONVERT (varchar), GETDATE (), 110): 05-16-2015
Select CONVERT (varchar), GETDATE (), 111): 2015/05/16
Select CONVERT (varchar), GETDATE (), 112): 20150516
Select CONVERT (varchar), GETDATE (), 113): 16 05 2015 10:57:49:513
Select CONVERT (varchar), GETDATE (), 114): 10:57:49:547
Select CONVERT (varchar), GETDATE (), 120): 2015-05-16 10:57:49
Select CONVERT (varchar), GETDATE (), 121): 2015-05-16 10:57:49.700
Select CONVERT (varchar), GETDATE (), 126): 2015-05-16t10:57:49.827
Select CONVERT (varchar), GETDATE (), ():???? ?????? 1427 10:57:49:907am
Select CONVERT (varchar), GETDATE (), 131): 18/04/1427 10:57:49:920am

Common:
Select CONVERT (varchar), GETDATE (), 8): 10:57:46
Select CONVERT (varchar), GETDATE (), 24): 10:57:47
Select CONVERT (varchar), GETDATE (), 108): 10:57:49
Select CONVERT (varchar), GETDATE (), 12): 150516
Select CONVERT (varchar), GETDATE (), 23): 2015-05-16

SQL Server date Format function Convert

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.