SAP Knowledge Base Article - Public

3483776 - Date of Birth returning in negative values - SuccessFactors OData API

Symptom

You noticed that some EPOCH values, for Date of Birth (and maybe other fields), are returning in negative values.

Environment

  • SAP SuccessFactors HCM Suite
    • OData API

Reproducing the Issue

  1. Run an API query for PerPerson or other People entities
  2. Query has to be in JSON format
  3. returns data for some employee with DOB in negative values

Cause

Expected behavior for people who were born before 1970. 

Resolution

Since the EPOCH time is measured "/Date(<ticks>)/", <ticks> = number of milliseconds since midnight of day 1, 1970.

Hence, the values being negative are not a proper issue, they simply indicate the person was born before 1970. Hence, please just proceed to any EPOCH converter to get the Date of Birth in Human time stamp for the affected employee. 

Note: In case you are receiving wrong dates when converting, you might remove the last 3 digits in case if you are trying to convert milliseconds. Also, note that dates before 14 September 1752 (pre-Gregorian calendar) are not accurate.

See Also

https://help.sap.com/docs/SAP_SUCCESSFACTORS_PLATFORM/d599f15995d348a1b45ba5603e2aba9b/971f5829b7aa4c9fab04c12f06838683.html

Keywords

epoch, DOB, date of birth, negative, \/Date(-27216000000)\/, dob, JSON, response.  , KBA , LOD-SF-INT-EC , Employee Central SFAPI & OData Entities , LOD-SF-INT-ODATA , OData API Framework , Problem

Product

SAP SuccessFactors HCM Suite all versions