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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Different DATEPART results

Status
Not open for further replies.

NickCorlett

Technical User
May 23, 2002
71
0
0
GB
I have two servers both running SQL2000 SP3a one server is Windows 2000 and the other Windows 2003.

I am getting different results when attempting to identify days of the week, one says that Saturday is the 6th day whilst the other says it's the 7th.

I think this is something to do with language or country settings but I am unable to find which setting in particular.
 
George,

Thanks for the reply, I have been on annual leave.

If I run SELECT @@DATEFIRST on both servers, one gives me 1 the other gives me 7.

If I use the SET DATEFIRST 1 option on the failing server this only corrects the problem for this connection.

I have done some investigation and I have ensured that the Default Language for user is "British English" which should mean that Monday is returned as the first day, however this is not the case!

Any advice would be appreciated.

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top