SQLServer database common date and time format conversion string

Source: Internet
Author: User
* ** Filename: sqlserver' is commonly used to convert a string from a string to a date format. * Description: a string of commonly used Date and Time formats in the SQLServer database. * Version: 1.0 * Created: 201 is commonly used during page display and query.

/* ===================================================== ========================================================== ** Filename: sqlserver.txt into a daily format. * Description: SQLServer * Version: 1.0 * Created: 201

/* ===================================================== ==========================================================
*
* Filename
* Description: a string that is commonly used to convert the date and time formats of SQL Server databases. This string is commonly used when pages are displayed and queried.
* Version: 1.0
* Created: 2013.08.14
* Author: liangjw
* E-mail: liangjw0504@163.com
* Q: 592568532
* Profile Url: http://90ideas.net/
* Company: Copyright (C) Create Family Wealth Power By Peter
*
========================================================== ================================================= */
* Remarks: uploads the encapsulation of some of the frequently-used methods summarized by yourself. There are deficiencies and imperfections. I hope you can point them out and wish to work together.
* This article mainly studies the development of erp, cms, crm, B2B, oa and other systems and websites. We welcome IT personnel who share the same pursuit and learning to learn and communicate with each other.
* Learn and discuss about asp.net mvc, Ajax, jquery, html/css, xml, sqlserver, wpf, IIS, server construction, and security technologies.
<无>
-- SQL server String to date format, GETDATE () is the time format to be replaced SELECT CONVERT (VARCHAR (100), GETDATE (), 0) -- 05 16 2006 am select convert (VARCHAR (100), GETDATE (), 1) -- 05/16/06 select convert (VARCHAR (100), GETDATE (), 2) -- 06.05.16 select convert (VARCHAR (100), GETDATE (), 3) -- 16/05/06 select convert (VARCHAR (100), GETDATE (), 4) -- 16.05.06 select convert (VARCHAR (100), GETDATE (), 5) -- 16-05-06 select convert (VARCHAR (10 0), GETDATE (), 6) -- 16 05 06 select convert (VARCHAR (100), GETDATE (), 7) -- 05 16, 06 select convert (VARCHAR (100 ), GETDATE (), 8) -- 10:57:46 select convert (VARCHAR (100), GETDATE (), 9) -- 05 16 2006 10: 57: 46: 827AM select convert (VARCHAR (100), GETDATE (), 10) -- 05-16-06 select convert (VARCHAR (100), GETDATE (), 11) -- 06/05/16 select convert (VARCHAR (100), GETDATE (), 12) -- 060516 select convert (VARCHAR (100 ), GETDATE (), 13) -- 16 05 2006 10: 57: 46: 937 select convert (VARCHAR (100), GETDATE (), 14) -- 10: 57: 46: 967 select convert (VARCHAR (100), GETDATE (), 20) -- 10:57:47 select convert (VARCHAR (100), GETDATE (), 21) -- 10:57:47. 157 select convert (VARCHAR (100), GETDATE (), 22) -- 05/16/06 10:57:47 am select convert (VARCHAR (100), GETDATE (), 23) -- select convert (VARCHAR (100), GETDAT E (), 24) -- 10:57:47 select convert (VARCHAR (100), GETDATE (), 25) -- 10:57:47. 250 select convert (VARCHAR (100), GETDATE (), 100) -- 05 16 2006 am select convert (VARCHAR (100), GETDATE (), 101) -- 05/16/2006 select convert (VARCHAR (100), GETDATE (), 102) -- 2006.05.16 select convert (VARCHAR (100), GETDATE (), 103) -- 16/05/2006 select convert (VARCHAR (100), GETDATE (), 104) -- 16.05.2006 SELEC T convert (VARCHAR (100), GETDATE (), 105) -- 16-05-2006 select convert (VARCHAR (100), GETDATE (), 106) -- 16 05 2006 select convert (VARCHAR (100), GETDATE (), 107) -- 05 16,200 6 select convert (VARCHAR (100), GETDATE (), 108) -- 10:57:49 select convert (VARCHAR (100), GETDATE (), 109) -- 05 16 2006 10: 57: 49: 437AM select convert (VARCHAR (100), GETDATE (), 110) -- 05-16-2006 select convert (VARCHAR (100), GETDATE (), 111) -- 2006/05/16 select convert (VARCHAR (100), GETDATE (), 112) -- 20060516 select convert (VARCHAR (100), GETDATE (), 113) -- 16 05 2006 10: 57: 49: 513 select convert (VARCHAR (100), GETDATE (), 114) -- 10: 57: 49: 547 select convert (VARCHAR (100), GETDATE (), 120) -- 10:57:49 select convert (VARCHAR (100), GETDATE (), 121) -- 10:57:49. 700 select convert (VARCHAR (100), GETDATE (), 126 )-- 2006-05-16T10: 57: 49.827 select convert (VARCHAR (100), GETDATE (), 130) -- 18 ???? ?????? 1427 10: 57: 49: 907AM

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.