Solved

Storing dates less than year 1900

Posted on 2009-04-08
4
428 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL Insert to Begin if data exists 2 32
Need help with T-SQL on SQL Server 2014 9 37
how to just get time from a date 6 32
RAISERROR WITH NOWAIT 2 16
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
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 ?
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

861 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