Start a new topic

Getting Error while loading Timestamp field through REST API

Hi ,

I am trying to load data to an Entity through REST API. This entity has a Timestamp field.

 Thouh I am able to load the Data without the timestamp value.

 But I am getting following error while trying to load the Timestamp field.

 "errorMessage" : "Unable to parse value [2020-01-01T00:00:00Z] as a date (for expression [IncorporationFormationDate])"

 I was looking for details in Smearchy document for any guidance , I have found below statement regarding that.

 "The REST API uses the ECMAScript standard format (YYYY-MM-DDTHH:mm:ss.sssZ) for timestamps.

 This format includes an explicit timezone component, and conversion is performed automatically."

 Please suggest me a solution for this.


Thank you very Much,

Kousik

1 Comment

Hello Kousik,


As the error message says-  "Unable to parse value [2020-01-01T00:00:00Z] as a date (for expression [IncorporationFormationDate])" 

You have missed '.sss' in the value and that's why it is throwing the error, The format is as follows: YYYY-MM-DDTHH:mm:ss.sssZ 

 You check the generated REST API endpoint and structure, the format is explicitly defined there : 


You can have a value like this-2020-01-01T00:00:00.000Z


Thank you.


1 person likes this
Login to post a comment