2

This is a slightly odd problem, which means the solution is probably something trivial that im just missing.

I have SQLServer 2008 developer on my local. I was using the Date type, and then realized godaddy uses 2005 which Only supports datetime. Im using LINQ, so I just changed to a datetime on the database side and changed the server data type in the dbml to DateTime NOT NULL.

On my local machine, everything works fine with these changes, I didnt have to do anything else. But using the actual production site on srvr2005 I get the SqlDatetime overflow error.

Any ideas?

3
  • All dates are between 1980 and now. Using DateTime on my local machine, everything works fine. Commented Aug 9, 2009 at 1:43
  • Figured it out. I was right, it was something dumb on my part. Sorry to waste your time, I have a habbit of figuring things out as soon as a ask someone Commented Aug 9, 2009 at 1:56
  • Care to elaborate? "Figured it out" doesn't help posterity :) Commented Aug 9, 2009 at 2:01

2 Answers 2

1

date in SQL Server 2008 has a range of 1/1/0001 to 12/31/9999. datetime is 1/1/1753 to 12/31/9999. Are you doing something pre-American Revolution?

Also, smalldatetime is 1/1/1900 to 6/6/2079. You may have a date that falls out of this range that could be a problem.

Sign up to request clarification or add additional context in comments.

Comments

0

Depends on what the value of the DateTime is. Are you generating any dates before 1753 or greater than 9999-12-31 ?

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.