Human Capital Management Blogs by Members
Gain valuable knowledge and tips on SAP SuccessFactors and human capital management from member blog posts. Share your HCM insights with a post of your own.
cancel
Showing results for 
Search instead for 
Did you mean: 
vijair
Explorer
Successfactors Odata service uses Edm.DateTime ( January 1, 1753 to December 31, 9999) and the date is stored in the database in same format. Successfactors Odata api supports two formats : ATOM and JSON. When we query the database in ATOM (Atom XML) format there won't be any issues as it returns values in date-time format. See below sample queries.

In ATOM format

https://<hostname>/odata/v2/PerPerson?$filter=personIdExternal+eq+'350196'&$format=ATOM



 

 In JSON format.

https://<hostname>/odata/v2/PerPerson?$filter=personIdExternal+eq+'350196'&$format=JSON



It returns Date value in epoch. Date(0) is returned because its 0 seconds elapsed since 1970-01-01 T00:00:00 UTC.

Now we will do a query which will return date = 31.12.9999.

-----------------------------------------------------------------------------------

In ATOM format

https://<hostname>/odata/v2/EmpJob?$filter=userId+eq+'200'&$format=atom&$select=endDate



In JSON format

https://<hostname>/odata/v2/EmpJob?$filter=userId+eq+'200'&$format=json&$select=endDate



 

Date(253402300799000) is Jan 11, 1978, here it went wrong. So if you are dealing with dates, always prefer using ATOM format.

The maximum possible date value that could passed successfully in JSON format is Nov 16, 5138, l call it as "Year 5138 Problem" !!!