Question : MS SQL Server - The Conversion of a char data type to a datetime data type resulted in an out-of-range date time value

Our Windows 2000 server recently failed with a registry error. The company that manages our server was unable to fix the old server so they rebuilt it as a Windows 2003 Server, and reinstalled MS SQL Server 2000, and set up our database from a backup.

We have a custom built program for managing quotes that connects to the database, and it is now throwing an error with the date fields.

Here is an example of a query that is failing:
 
1:
2:
3:
4:
5:
SELECT     WSID, WSNO, ACTCO, ACTNAME, WSNAME, Owner, Updated, ApprovedBy  
FROM       Worksheet  
WHERE TABSEQ=0  
AND  Updated BETWEEN CAST('2006-01-01' AS datetime)  
AND CAST('2010-07-21' AS datetime)


We do not have the source code for this program so I can not modify the query.  The only option that I have is to somehow modify the SQL server so that it accepts the date time format.

Any suggestions on how to do this?

Thanks

Answer : MS SQL Server - The Conversion of a char data type to a datetime data type resulted in an out-of-range date time value

Yeah, looks like they screwed up the language setting.

You could try modifying the existing logins using:

EXEC sp_defaultlanguage

to use ~"English U.S." rather than ~"English U.K."

that *might* do it.
Random Solutions  
 
programming4us programming4us