Dates

Tagged:

Currently contains 6 posts

Avatar

November 05, 2020 22:38

TIhelping

Hello,

I call the API to get some custom fields that the FieldType is date.
The problem is that when I get the date in my computer the date is in the format MM/DD/YYYY and in other computers is DD/MM/YYYY.

Avatar

November 05, 2020 22:41

Jarrid-PCRecruiter

Hi there, here’s the documentation on date formatting:
Date Field Format
Dates should be sent (and will be returned) in ISO-8601 format for all non-custom fields.

Custom fields will be returned in the format based on the accept-language submitted in the header. If no accept-language is submitted then the default en-US en-US will be applied which is MM-DD-YYYY.

Avatar

November 05, 2020 22:50

TIhelping

And there is a way to force how to return the dates?

Avatar

November 05, 2020 22:55

Jarrid-PCRecruiter

Custom fields will be returned in the format based on the accept-language submitted in the header.

Add &Accept-Language=(whatever language) to the end of the URL.

Avatar

December 22, 2020 15:37

TIhelping

Hi, I already put the header in all the api calls but in some computers dates are formatted DD/MM/YYYY

Avatar

December 22, 2020 16:29

Jarrid-PCRecruiter

If you set the Accept-Language it should accept that format if that’s the format of that language/region.

Reply to thread