+ Start a Discussion
kmadminkmadmin 

Minimum date value possible via API

What is the minimum date/time value possible for setting via the API? for example in .NET you can have DateTime.MinValue which gives 1/1/0001. However, the API doesn't accept this as a valid date.

 

I have opportunity records without close dates in some. I just want to be able to put some date for them so that they won't show up in any report.

Best Answer chosen by Admin (Salesforce Developers) 
SuperfellSuperfell

See 

http://www.salesforce.com/us/developer/docs/pages/index_Left.htm#StartTopic=Content/sforce_api_calls_soql_select_dateformats.htm


"Only dates within a certain range are valid. The earliest valid date is 1700-01-01T00:00:00Z GMT, or just after midnight on January 1, 1700. The latest valid date is 4000-12-31T00:00:00Z GMT, or just after midnight on December 31, 4000."

 

 

All Answers

SuperfellSuperfell

See 

http://www.salesforce.com/us/developer/docs/pages/index_Left.htm#StartTopic=Content/sforce_api_calls_soql_select_dateformats.htm


"Only dates within a certain range are valid. The earliest valid date is 1700-01-01T00:00:00Z GMT, or just after midnight on January 1, 1700. The latest valid date is 4000-12-31T00:00:00Z GMT, or just after midnight on December 31, 4000."

 

 

This was selected as the best answer
SuperfellSuperfell

Hmmm, the links to the docs seem broken, but this is from the date formats page in the API docs.

Mark SFMark SF

As Simon said, there is currently a problem with some doc links. Here is the correct URL for future reference:

 

http://www.salesforce.com/us/developer/docs/api/index_Left.htm#StartTopic=Content/sforce_api_calls_soql_select_dateformats.htm