Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Inserting dates prior to 1/1/1900

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-08-06 : 00:11:24
Dijo writes "My application sets a NULL date to 14-Oct-1582 and hence tries to insert a records with 14-Oct-1582 date value.
It looks like SQL Server/ODBC doesn't like dates prior to 1/1/1900. The error I get is:
"ODBC SQLExecute failed. [Microsoft][ODBC SQL Server Driver]Datetime field overflow"
My sample SQL is:
insert into milestone_type(last_updated_dttm, last_updated_id, created_dttm, created_id, milestone_event, dur_minutes, percentage, pct_or_dur, milestone_type) values (26-Jul-2001 15:00:06, BGUMMI, 14-Oct-1582 18:00:00, , WARNING, 0, 100, P, 1)

Would you be able to help me with a work-around for this?

Thanks in advance."
   

- Advertisement -