Date Formatting
When submitting dates to the API, we recommend using the ISO 8601 to avoid ambiguity. The API will accept dates in other formats, but it may misinterpret those formats.
ISO 8601
The ISO 8601 format is an international standard for representing dates and times.
Here are some examples:
Format | Example | Description |
---|---|---|
YYYY-MM-DD | 2019-01-01 | Date |
YYYY-MM-DDTHH:MM:SS | 2019-01-01T12:00:00 | Date and time |
YYYY-MM-DDTHH:MM:SSZ | 2019-01-01T12:00:00Z | Date and time with UTC timezone |
YYYY-MM-DDTHH:MM:SS±HH:MM | 2019-01-01T12:00:00-05:00 | Date and time with timezone offset |
Ambiguous Formats
Other formats may be ambiguous, for example: You could interpret 01/02/2023
as either January 2nd or February 1st, depending on your locale.
The Fleetio API will typically interpret these dates as day-first, then month,
meaning that it would understand 01/02/2023
to mean February 1st, 2023, but
there may be exceptions.