Solved

Storing dates less than year 1900

Posted on 2009-04-08
4
400 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
Comment Utility
change your column to datetime
0
 
LVL 41

Expert Comment

by:ralmada
Comment Utility
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
Comment Utility
If you need to store dates earlier than 1753 then you will have to use a varchar value
0
 

Author Closing Comment

by:JOLEEJJ
Comment Utility
THANKS,
CHEERS
0

Featured Post

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Join & Write a Comment

Suggested Solutions

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

762 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now