October 20, 2008 at 8:27 am
Hello
I am having what looks like a date format problem between to supposedly identical servers. If I run SELECT CONVERT (datetime, '2008-1-15) on one server it brings back a datetime value but on the other it gives me a char conversion error unless I use US format for the date ('2008-15-1).
Both servers seem identical in collation and server language/regional settings so I can't understand why this is happening. Any help would be appreciated.
Regards
Graham
October 20, 2008 at 10:19 am
code pages?
October 20, 2008 at 10:33 am
This sounds like the SET DATEFORMAT option is set incorrectly.
By the way,
Graham Macfarlane (10/20/2008)
... it gives me a char conversion error unless I use US format for the date ('2008-15-1).
You should be aware that this is not a valid "US date format". So far as I know, "Month before Day" is almost universal when the Year comes first.
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
October 21, 2008 at 12:24 am
Thanks for your help. I have checked sp_configure 'default language' on both servers and they are identical and the collations are also identical so I assume this makes the code pages identical as a result?
October 21, 2008 at 1:42 am
Hello again, think I have got to the bottom of this now. Although the default language is the same on both servers (ENGLISH). The logins are set differently on each server - some with language BRITISH ENGLISH and some with just ENGLISH. When these are both set the same on both servers, the code works. I now need to work out how and when this mismatch occurred!
Thanks again for your help.
Graham
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply