question

Abdul Rahman avatar image
Abdul Rahman asked

sql server management studio error

Hi: i am getting error while executing simple select query in sql server management studio 2008 with sql server 2008 express edition.

Error is: 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.

Please help thanks in advance Abdul Rahman

sql-server-2008sql-server-express
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Pavel Pawlowski avatar image
Pavel Pawlowski answered

It seems, that you are probably trying to convert a value to a datetime, but the value is out of datetime data type range. The range of this data type is between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.

See MSDN for the specs.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Dugi avatar image
Dugi answered

Can you post the sample of you T-SQL!?

Seems that you are trying to query select statement with datetime that is out fo the range. In SQL Server 2005 we have the date range from January 1, 1753, through December 31, 9999

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.