SQL Date Conversion Formats

20180824-00:00:00:000 — SELECT CONVERT(VARCHAR,@date,112) + ‘-‘ + CONVERT(VARCHAR,@date,114)
20180824-203947843 — SELECT CONVERT(VARCHAR,@date,112) + ‘-‘ + REPLACE(CONVERT(VARCHAR,@date,114),’:’,”)
08/24/2018 101 SELECT CONVERT(VARCHAR,@date,101)
2018.08.24 102 SELECT CONVERT(VARCHAR,@date,102)
24/08/2018 103 SELECT CONVERT(VARCHAR,@date,103)
24.08.2018 104 SELECT CONVERT(VARCHAR,@date,104)
24-08-2018 105 SELECT CONVERT(VARCHAR,@date,105)
24 Aug 2018 106 SELECT CONVERT(VARCHAR,@date,106)
Aug 24, 2018 107 SELECT CONVERT(VARCHAR,@date,107)
10:00:00 108 SELECT CONVERT(VARCHAR,@date,108)
Aug 24 2018 1:00:00:000PM 109 SELECT CONVERT(VARCHAR,@date,109)
08-24-2018 110 SELECT CONVERT(VARCHAR,@date,110)
2018/08/24 111 SELECT CONVERT(VARCHAR,@date,111)
20180824 112 SELECT CONVERT(VARCHAR,@date,112)

About Vincent Stefanetti

Vincent Stefanetti Senior Consultant MAX Manufacturing Software Working with MAX and Related Technologies Since 1987 MAX ERP System Implementations and Projects MAX, Dynamics GP, Synergy, Event Manager, Crystal Reports, SQL Reporting Services, Database and System Migrations and Updates, MAX Training Classes - All Levels, Custom Reporting.
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply