SQL – Changing to British Datetime format

Error converting data type varchar to datetime
Are you getting the above error?

Run the following under your app user.

select @@Language, @@Langid

If it says us_english then you’re probably hitting errors when parsing dates as DD/MM/YYYY.
We can change the default language for a particular user. Login to your SQL server as an administrator account and run the following;

ALTER LOGIN yourapplogin WITH DEFAULT_LANGUAGE = British;
GO

Then login with the user “yourapplogin” and run

select @@Language, @@Langid

Hopefully you now see “British” and 23.



Leave a Reply

You must be logged in to post a comment.