BLOG

How to convert ‘20140620’ date to ‘DD-MM-YYYY’ format – MSDN TSQL forum

18-02-2019  0 Comment(s)

I have data for date fields like “20140620”(YYYYMMDD) while inserting into the table it should be in the format “DD-MM-YYYY

Can any one please help me to achive this.

SELECT FORMAT(CAST('20140620' as DATE), 'dd-MM-yyyy', 'en-US'), CAST('20140620' as DATE)

SELECT CONVERT(VARCHAR(10), '20140620', 105)

Comment Here

Comments

No Comments to Show

WE ALWAYS WORK WITH :