Solved

Storing dates less than year 1900

Posted on 2009-04-08
4
435 Views
Last Modified: 2012-05-06
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
Comment
Question by:JOLEEJJ
  • 3
4 Comments
 
LVL 41

Expert Comment

by:ralmada
ID: 24103367
change your column to datetime
0
 
LVL 41

Expert Comment

by:ralmada
ID: 24103371
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
 
LVL 41

Accepted Solution

by:
ralmada earned 500 total points
ID: 24103378
If you need to store dates earlier than 1753 then you will have to use a varchar value
0
 

Author Closing Comment

by:JOLEEJJ
ID: 31568333
THANKS,
CHEERS
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Viewers will learn how the fundamental information of how to create a table.

749 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