SAP Knowledge Base Article - Public

3619310 - Upsert Error due to illegal datetime value in json format - SAP Successfactors OData API

Symptom

You are unable to update a custom object due to an error for date:

Error message: "Property XXXXXXX has invalid value. Illegal DateTime value in JSON format: XXXX-XX-XXT00:00:00. Please follow the standard format: "/Date()/", = number of milliseconds since midnight Jan 1, 1970. Example: "/Date(1495746637000)/". For more information, see https://help.sap.com/viewer/d599f15995d348a1b45ba5603e2aba9b/latest/en-US/971f5829b7aa4c9fab04c12f06838683.html., required type is Edm.DateTime."

Environment

  • SAP SuccessFactors OData API

Reproducing the Issue

  1. Attempt to Upsert an object in SAP SuccessFactors via OData API
  2. Use a date value in JSON format: XXXX-XX-XX 00:00:00.
  3. Receive error message indicating illegal DateTime value.

Cause

The date format is incorrect.

Resolution

  1. Convert the date used into Epoch format.
  2. Use the converted date in the Request Payload.
  3. Refer to the tool for conversion: https://www.epochconverter.com/

See Also

SAP Help Portal - DateTime format

Keywords

odata, api, error, illegal datetime, json format, sap successfactors, boomi, integration, epoch, conversion, cust_immigrationAmountreceived, Edm.DateTime, HTTP 400 , KBA , LOD-SF-INT-BPI , Dell & Boomi Infrastructure , Problem

Product

SAP SuccessFactors Employee Central all versions ; SAP SuccessFactors HCM Suite all versions