tags:

views:

488

answers:

2

I created a Date and Time column in a Sharepoint list called EventDate. According to Microsoft documentation the Date and Time column maps to the System.DateTime type.

Now I'm seeing an error message when I try to insert the following date into that column:

Date: 1/1/1800

Error message: "Invalid date/time value. A date/time field contains invalid data. Please check the value and try again."

I also tried to use set DateTime.MinValue and I receive the same error message. But if I insert a more recent date like 1/1/1900 it works fine.

Does Sharepoint have a limitation of the minimum value of a Date and Time field?

+1  A: 

I found out that if you try to insert the value 1/1/1800 in a Sharepoint Date and Time field manually (using Sharepoint forms) you receive this error:

"You must specify a valid date within the range of 1/1/1900 and 12/31/8900."

Therefore, Sharepoint only accepts value between 1/1/1900 and 12/31/8900.

That sucks!

Rodrigo
Why do you want to add that date? If you really need a date before 1900, you could use a Single line of Text field.
Kit Menke
Very nice answer. It would be even better without the last line.
Jason Weber
A: 

There is no obvious reason as to why SharePoint limits the storage of the datetime datatype as it does now.

In SQL Server, the smalldatetime columns allows date in the range from 1/1/1900 - 6/6/2079 and the datetime columns are ranged 1/1/1753 - 12/31/9999

So there's no range from 1/1/1900 - 12/31/8900 and I haven't got the slightest idea why the limitation exists.

To make things even worse: SQL SErver 2008 has a smalldatetime2 and datetime2 type (the really just added a 2 to the name :/) wich allows any date (1/1/0000 - 12/31/9999) but even SharePoint 2010 on a SQL 2008 has the same limit

And Kit: using a single line of text is a very poor substitu, as there is no way to validate the values entered by the user

Sven De Bont