Guide

ISO 8601 date and time format

Updated 14 July 2026 Part of Time & Dates

ISO 8601 is a shared format for writing dates, times, durations, and intervals so people and systems read them the same way everywhere. Its main habit is to put the largest unit first, so a calendar date is written as year, then month, then day. That order removes the common confusion between regional formats such as MM/DD and DD/MM, where the same-looking date can mean different things to different readers. ISO 8601 also gives a clear syntax for clock times, time-zone designators, and periods of time, which is why it is common in software, records, schedules, and data exchange.

How ISO 8601 writes dates

The standard date pattern is YYYY-MM-DD: year first, then month, then day. Hyphens make the parts easier to read, and the order makes sorting simple. If you arrange ISO-formatted dates alphabetically, they also fall into calendar order.

That is the practical advantage over local date customs. In some places, a slash-separated date begins with the month. In others, it begins with the day. Without context, MM/DD and DD/MM can be unsafe because the reader has to know the writer’s convention. ISO 8601 removes that guesswork by making the year the anchor and placing the smaller units after it.

How times and time zones work

A time can follow the date after the letter T, using the pattern hh:mm:ss. The T is a separator. It tells a reader or a program that the calendar part has ended and the clock part has begun.

ISO 8601 uses clock time across the full day rather than AM and PM. That keeps the value compact and avoids another source of local interpretation. Fractions of a second can be added when a system needs finer precision, such as in event logs.

Time-zone information comes at the end. Z means Coordinated Universal Time, usually called UTC. A plus or minus offset shows how far the stated local time is from UTC. This matters because the same clock time can occur in many places at different moments. A timestamp with a time-zone designator identifies the moment more clearly than a bare local time.

Durations and intervals

ISO 8601 can also describe how long something lasts. A duration begins with P, for period, and then uses letters to mark the units. Date units can include Y for years, M for months, and D for days. If the duration includes clock units, a T separates them from the date part, followed by H for hours, M for minutes, and S for seconds.

The letter M can mean month or minute, depending on where it appears. Before the T, it belongs to the date part. After the T, it belongs to the time part. That separation is what keeps the syntax readable.

An interval describes a span between two points, or between a starting point and a duration. It is useful when you need to record not just a single timestamp, but the period covered by a booking, measurement, licence, subscription, or event.

When to use it

Use ISO 8601 when dates and times must travel across systems, teams, or regions without extra explanation. It is especially useful in databases, APIs, filenames, logs, exports, calendars, and any setting where sorting and interpretation need to be predictable.

For public-facing prose, a natural written date may still be kinder to the reader. For structured data, ISO 8601 gives you a clear default: one format, one order, and fewer chances for a date or time to be misunderstood.