0

Below is a output of the API call for the journal endpoint in Xero developing. Xero (See the jason output)

JournalNumber;JournalDate
344;/Date(1590019200000+0000)/

Does anyone know what is the format of this journal date and is there anyway I can convert this to yyyy-mm-dd

MT0
  • 143,790
  • 11
  • 59
  • 117
suresh_chinthy
  • 377
  • 2
  • 12
  • 1
    It's in the doc here: https://developer.xero.com/documentation/api/requests-and-responses - it's a Unix timestamp but in milliseconds. – droopsnoot Sep 04 '20 at 08:24

1 Answers1

2

Yeah this is the MS date format, just an epoch date prefixed with Date - It is legacy on a few of the xero API endpoints. All the SDK's should handle this deserialization for you but easily converted by plucking out the timestamp.

Pretty sure the python SDK handles this for you: https://github.com/XeroAPI/xero-python/blob/d0473ba91099de3464b3dffa377df5a11ad95afc/xero_python/api_client/deserializer.py#L145

SerKnight
  • 2,502
  • 1
  • 16
  • 18