Dates and times
The Asana API uses the ISO 8601 date time format for endpoints that return or accept date and time values.
Date-only values
For values that are dates without a time, such as a task's due_on
field, the format will be the date-only ISO 8601 format YYYY-MM-DD
.
Date and time values
The ISO 8601 format YYYY-MM-DDTHH:mm:ss:fffZ
is used for fields that return or accept date and time values.
Date Part | Description |
---|---|
YYYY | Four-digit year (e.. 2024) |
MM | Two-digit month (01 = January, 02 = February, ..., 12 = December) |
DD | Two-digit day of the month (01 through 31) |
T | Separator indicating the start of the time component |
HH | Two-digit hour in 24-hour format (00 through 23) |
mm | Two-digit minute (00 through 59) |
SS | Two-digit second (00 through 59) |
fff | Three-digit fractional seconds (000 through 999) |
Z | Indicates Coordinated Universal Time (UTC) |
Examples
- A task's
due_on
field may return a date-only value such as2024-05-27
. This value represents May 27, 2024. - A task's
created_at
field may return a value such as2024-05-24T19:50:18.053Z
. This value represents May 24, 2024, at 7:50 PM UTC, plus 18 seconds and a fractional value of 0.053 seconds.
API Query example
Some API endpoints accept a date/time value as a query param. One example is the GET /tasks
endpoint that accepts a modified_since
query param to filter tasks that have changed since a given date/time. To query tasks in the project with an GID of 123456
that have been modified since May 24, 2024 at 4:00 PM UTC, the API call would look like the following.
GET https://app.asana.com/api/1.0/tasks?project=123456&modified_since=2024-05-24T16:00:00.000Z
Updated 6 months ago