• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 464
  • Last Modified:

Storing dates less than year 1900

Hi
I have  problem in storing dates less than year 1900 in sql server 2005. I get the following error message:
SqlDbType.SmallDateTime overflow.  Value '01/22/1898 00:00:00' is out of range.  Must be between 1/1/1900 12:00:00 AM and 6/6/2079 11:59:59 PM.
Can anybody help me to solve this problem,
Thanks
JOLEEJE
0
JOLEEJJ
Asked:
JOLEEJJ
  • 3
1 Solution
 
ralmadaCommented:
change your column to datetime
0
 
ralmadaCommented:
smalldatetime can only
datetime has a range of January 1, 1753, through December 31, 9999

and smalldatetime range is from January 1, 1900, through June 6, 2079

0
 
ralmadaCommented:
If you need to store dates earlier than 1753 then you will have to use a varchar value
0
 
JOLEEJJAuthor Commented:
THANKS,
CHEERS
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now