SQL Server - An error occurred while executing batch. Error message is: SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.
Asked By Tammy Carson on 28-Apr-09 06:35 PM
We get this error when running queries on our sql 2005 server when we move our timezone ahead. we require the ability to move dates ahead for testing purposes. if we run the same query in our current timezone it works fine, when we implement a timezone in the future we get the error above. Has anyone encountered this type of issue before and know how to resolve it? or if there is a different method of moving the dates on our testing system ahead? We can't just move it ahead as our network uses activedir and it won't allow the dates to be out of synch.
Santhosh N replied to Tammy Carson on 28-Apr-09 10:30 PM
As theerror msg clearly says, thedates must be in the range 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM, I just dont think you ever need to test the date above this, then still you need to do that, I am afraid you need to switch your date column to some varchar type...