Solved

sql 2005 datetime overflow

Posted on 2013-01-28
3
552 Views
Last Modified: 2013-01-29
How to get rid of the error

SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.

I'm using SQL Server 2005 and ASP.net / C#.

Thanks.
0
Comment
Question by:minglelinch
3 Comments
 
LVL 36

Assisted Solution

by:Miguel Oz
Miguel Oz earned 250 total points
ID: 38829027
What action (C# - select, insert, etc) are you trying to do?
One possible cause of overflow error is to pass an uninitialised DateTime with the value DateTime.MinValue which is outside the allowable range for SQL's datetime. (E.g. when inserting new row(s) - possible solution use default date time value)
Check:
http://stackoverflow.com/questions/1226863/system-data-sqltypes-sqltypeexception-sqldatetime-overflow
0
 
LVL 10

Accepted Solution

by:
Monica P earned 250 total points
ID: 38829904
0
 
LVL 1

Author Closing Comment

by:minglelinch
ID: 38831254
Thanks for the answers.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question