Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Server Date Format

Status
Not open for further replies.

BiggerD

Programmer
Jun 19, 2002
43
GB
How does the Server decide on what date format you are using i.e 22/01/03 causes a date time conversion error as the Server (2000) seems to be expecting an American format but on a SQL Server 7 it accepts the data and works with it as it should. I can get round this by uising 22 Jan 03 but this does not resolve why the problem occurs and a proper way of resolving the issue.
Can anyone Help ?
 
Check the Regional Settings on the server SQL server is running on. This is where the Date format is taken from.

You might find 'SET DATEFORMAT dmy' useful. It is used when converting a string to a datetime and you want to set the format.
 
The answer it seems does not lie in any of the usual suspects rather in the Security option within the SQL Server then Logins and right click the user(s) in question select properties and set the Default Laguage setting to you chsen selection, this has fixed my problem in question.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top