Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 462
  • 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

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

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