Have you ever wanted to convert a US date to UK format using SQL?

Have you ever come across the situation where you have data in US format and need it changed to UK format? Well I am going to show you how to use SQL to easily reformat the date.

I have had this problem several times in the past dealing with international clients who supply databases with the incorrect date format and use the below query to change the format.

SELECT CONVERT(VARCHAR(30), CONVERT(DATETIME, ‘6/1/2009 12:00:00 AM‘, 101), 103);

1

Leave a comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: