ISO 8601 Date/Time Format Reference

ISO 8601 date, time, interval and duration formats with component definitions.

Reference for ISO 8601 date and time representations: calendar, ordinal and week dates, times with timezone offsets, durations (PnYnMnD) and intervals, in both basic and extended forms with worked examples.

What is the difference between basic and extended ISO 8601 format?

Extended format uses separators (2026-06-11, 14:30:00), while basic format omits them (20260611, 143000). Both encode the same value; extended is more human-readable and is what most APIs and RFC 3339 use.

ISO 8601 date and time formats

ISO 8601 is the international standard for representing dates, times, durations and intervals as unambiguous text. It underpins RFC 3339, most web APIs, and database timestamp formats. This reference groups the standard’s representations — dates, times, durations and intervals — and shows each in both basic and extended form with a worked example.

How it works

A complete ISO 8601 timestamp combines a date and a time joined by T, optionally with a timezone designator: 2026-06-11T14:30:00Z.

Dates come in three flavours: calendar (YYYY-MM-DD), ordinal (YYYY-DDD, day-of-year), and week date (YYYY-Www-D). Week numbering is ISO-specific: weeks start Monday, and week 1 holds the year’s first Thursday.

Times are hh:mm:ss with optional fractional seconds (.sss) and a timezone: Z for UTC or ±hh:mm for an offset. Reduced precision is allowed, e.g. 14:30.

Durations use the P[n]Y[n]M[n]D T[n]H[n]M[n]S grammar — a leading P, then date parts, then T before time parts. PT0S and P0D both denote zero.

Intervals combine two of the above with a /: start/end (2026-06-01/2026-06-30), start/duration (2026-06-01/P1M), or duration/end (P1M/2026-06-30).

Tips and example

Across categories the sample instant 2026-06-11 14:30:00 UTC renders as:

calendar  2026-06-11
ordinal   2026-162
week date 2026-W24-4
datetime  2026-06-11T14:30:00Z
offset    2026-06-11T16:30:00+02:00

Prefer the extended form with explicit offsets in stored data — bare local times lose meaning across timezones. When you only need a date, use YYYY-MM-DD; it sorts lexicographically into chronological order, which is handy for filenames and keys. Use the filter below to find the exact pattern for any case.