← Cheat Sheets
ISO 8601 Dates and Times
The unambiguous international format.
# ISO 8601 Dates and Times
The unambiguous international format.
| Item | Format | Example |
|---|---|---|
| Date | YYYY-MM-DD | 2025-03-07 |
| Time | hh:mm:ss | 14:05:09 |
| Date and time | YYYY-MM-DDThh:mm:ss | 2025-03-07T14:05:09 |
| UTC | add Z | 2025-03-07T14:05:09Z |
| Offset | ±hh:mm | 2025-03-07T14:05:09+01:00 |
| Week | YYYY-Www | 2025-W10 |
| Duration | PnYnMnDTnHnMnS | P1DT12H |
| Interval | start/end | 2025-03-01/2025-03-31 |
Sorting ISO dates as text sorts them chronologically. Store times in UTC and convert for display.