June 3, 2003 at 2:07 am
I don't know if anyone else has had this problem in SQL2000 with SP 3, but I keep getting out-of-range error messages when using the getdate() function. The problem is, the result of the function is in US, even when the DB's language is British. I've tried formating the date and setting the language to british in code, but still no joy. The main offender is Query Analyzer. Is there a hidden language setting somewhere?
June 3, 2003 at 2:16 am
Hi richiey,
maybe this thread will help you
Might be the link is splitted
Cheers,
Frank
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
June 4, 2003 at 2:20 am
In Enterprise Manager
In Query Analyser
Dates and times are a pain in SQL Server, particularly if you have to deliver to external customers. I tend to stick with old fashioned CONVERT statements to allow for such problems.
June 4, 2003 at 8:01 am
Use
SET DATEFORMAT 'dmy'
or similar.
Works for me
June 4, 2003 at 2:21 pm
These problems normally occurs when the 'date' is stored as a string / varchar and then compare with a date variable/value. If all the variables are datetime and you assign getdate() to it there should be no problem. Force the string to date/time with a convert function and use the "SET DATEFORMAT 'dmy'" as mentioned by gbn.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply