SQL Server time Query

Source: Internet
Author: User
Tags getdate

Select CONVERT (varchar, GETDATE (), 8)--Get current time 14:13:59

Select CONVERT (varchar, GETDATE (), 23)-Retrieved 2017-07-01

Select CONVERT (varchar, GETDATE (), 12)-Acquired 170701

Select CONVERT (varchar, GETDATE (), 121)--Gets the day of the month, minutes, minutes, seconds, 2017-07-01 14:18:47.960

Select CONVERT (varchar, GETDATE (), 120)--date and time 2017-07-01 14:18:47

Select CONVERT (varchar), GETDATE (), 112)-Acquired date 20170701

Select CONVERT (varchar), GETDATE (), 101)-acquired date 07/01/2017

Select CONVERT (varchar), GETDATE (), 103)-Acquired date 01/07/2017

Select CONVERT (varchar), GETDATE (), 104)-Get date 01.07.2017

Select CONVERT (varchar), GETDATE (), 105)--12-09-2004

Select CONVERT (varchar), GETDATE (), 106)--12 09 2004


Select CONVERT (varchar), GETDATE (), 107)--09 12, 2004


Select CONVERT (varchar), GETDATE (), 108)--11:06:08


Select CONVERT (varchar), GETDATE (), 109)--09 12 2004 1


Select CONVERT (varchar), GETDATE (), 110)--09-12-2004


Select CONVERT (varchar), GETDATE (), 113)--12 09 2004 1


Select CONVERT (varchar), GETDATE (), 114)--11:06:08.177

SQL Server time Query

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.