Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Storing dates less than year 1900

Posted on 2009-04-08
4
Medium Priority
?
460 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
One of the most important things in an application is the query performance. This article intends to give you good tips to improve the performance of your queries.
Viewers will learn how the fundamental information of how to create a table.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

604 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