Page 1 of 1

Date time overflow problem

Posted: Sun Nov 02, 2008 9:36 am
by mydsworld
Hi,
I am trying to load a Timestamp field into a table in SQL server database.
It is giving error 'Date time overflow ...'. I checked the incoming timestamp value. It is like '0001-01-01 00:00:00'. However, I am able to load the field with CurrentTimestamp() value.

Please let me know whether SQL server has any restriction on such timestamp value.

Thanks

Posted: Sun Nov 02, 2008 10:27 am
by ray.wurlod
Can SQL Server handle the timestamp 0001-01-01 00:00:00 successfully?

There is a problem with the year 1AD because the previous year is not 0AD - there is no such year - the previous year is 1BC. Therefore the transition through midnight is not properly defined. Can you try 0001-01-01 00:00:01 as the timestamp?

Posted: Sun Nov 02, 2008 12:20 pm
by mydsworld
So, what would be the timestamp for '0001-01-01 00:00:00' that would be accepted in SQL Server.

Thanks.

Posted: Sun Nov 02, 2008 12:36 pm
by ArndW
Did you try the "0001-01-01 00:00:01" as Ray suggested and did that work? If yes, then the answer is that you cannot represent "0001-01-01 00:00:00".