ISO 8601 is an international standard that defines a single, unambiguous way to represent dates and times. Its core format is YYYY-MM-DD for dates and HH:MM:SS for times, always ordered from the largest unit to the smallest. So September 27, 2022 at 6 p.m. becomes 2022-09-27 18:00:00.000.
The standard exists because date formats vary wildly across countries. “01/02/2024” means January 2nd in the United States and February 1st in most of Europe. ISO 8601 eliminates that confusion by locking in a universal format that works the same everywhere, whether you’re exchanging data between software systems, filing international documents, or sorting spreadsheets.
What the Standard Covers
ISO 8601 goes well beyond simple calendar dates. It provides standardized formats for time of day, Coordinated Universal Time (UTC), local time with UTC offsets, combined date-and-time values, time intervals, durations, and recurring time intervals. If it involves a point or span of time, the standard probably has a format for it.
How Dates and Times Are Written
The basic calendar date format is YYYY-MM-DD. The year always comes first as four digits, followed by the month (01 through 12), then the day. Hyphens separate the components but can be omitted in a “basic” format: 20240315 and 2024-03-15 both represent March 15, 2024.
Times use a 24-hour clock: HH:MM:SS. Midnight is 00:00:00, noon is 12:00:00, and 6:30 p.m. is 18:30:00. Fractional seconds are allowed after a decimal point, so 18:30:00.500 represents half a second past 6:30 p.m.
When you combine a date and time into a single value, the letter “T” separates them: 2024-03-15T18:30:00. You’ll see this format constantly in APIs, log files, databases, and programming languages.
Time Zones and UTC Offsets
ISO 8601 handles time zones by appending an offset to the time value. The letter “Z” (sometimes called “Zulu”) indicates UTC itself, the global reference point for timekeeping. A timestamp like 2024-03-15T18:30:00Z means 6:30 p.m. UTC, with no local offset.
For local times, the offset appears as a plus or minus value in hours and minutes. New York in winter (Eastern Standard Time) is five hours behind UTC, so the same moment would be written as 2024-03-15T13:30:00-05:00. Tokyo, nine hours ahead, would be 2024-03-16T03:30:00+09:00. There’s a subtle distinction worth knowing: “Z” specifically means UTC, while “+00:00” means a local time that happens to have zero offset from UTC. In practice, most systems treat them identically.
Durations and Intervals
Durations use a distinct syntax that starts with the letter “P” (for “period”). The letter “T” separates date components from time components. For example, P3Y6M2D means a duration of 3 years, 6 months, and 2 days. PT4H30M means 4 hours and 30 minutes, with no date component. PT90S is simply 90 seconds.
Only uppercase designator letters are allowed: P, Y, M, D, T, H, M, and S. A period (not a comma) serves as the decimal sign for fractional values. The 2019 revision of the standard removed the concept of “nominal durations” and now only recognizes exact durations, reducing ambiguity in how software interprets these values.
Intervals represent the span between two points in time. They can be expressed as a start and end (2024-01-01/2024-06-30), a start and a duration (2024-01-01/P6M), or a duration and an end (P6M/2024-06-30).
The ISO Week Date System
ISO 8601 defines its own week-numbering system that occasionally surprises people. Weeks always start on Monday, and Week 01 of a year is the week that contains the first Thursday of January. Another way to think about it: the first ISO week is the earliest week that has at least four days falling in January.
This means a few days at the start of January can belong to the previous year’s last week, and a few days at the end of December can belong to the next year’s first week. For example, January 1, 2010 fell on a Friday, and since that week only had one day in January, it was counted as Week 53 of 2009 rather than Week 01 of 2010. Week dates are written in the format YYYY-Www-D, where “W” is a literal letter, “ww” is the week number, and “D” is the day of the week (1 for Monday through 7 for Sunday).
Most years have 52 ISO weeks, but years where January 1 falls on a Thursday (or on a Wednesday in leap years) get a 53rd week.
Why ISO 8601 Matters for Data
The year-first format has a practical advantage that goes beyond avoiding cultural confusion: ISO 8601 dates sort correctly in alphabetical order. If you have a folder of files named with ISO dates, a simple text sort puts them in chronological order automatically. The same applies to database queries and spreadsheets. This property, called lexicographic sorting, is one of the main reasons the format dominates in software development and data management.
The Journal of eScience Librarianship describes the standard as providing “needed consistency in date formatting” that “can sort dates chronologically,” making it especially valuable for research data management where ambiguous dates can corrupt entire datasets.
ISO 8601 vs. RFC 3339
If you work with web technologies, you’ve likely seen RFC 3339 mentioned alongside ISO 8601. RFC 3339 is a simplified profile of ISO 8601 designed specifically for Internet protocols. It takes the most common subset of ISO 8601 and makes it stricter: the “T” separator between date and time is always required, and the hour value can only go up to 23 (ISO 8601 technically permits “24” to represent midnight at the end of a day). In practice, a valid RFC 3339 timestamp is almost always a valid ISO 8601 timestamp, but the reverse isn’t necessarily true because ISO 8601 allows formats like week dates and ordinal dates that RFC 3339 doesn’t cover.
The 2019 Revision
The current version of the standard, published on March 26, 2019, replaced the previous ISO 8601:2004 edition and split the standard into two parts. ISO 8601-1:2019 covers basic rules and is a heavily rewritten successor to the 2004 edition, with over 80% of the text changed. It introduces more than 40 newly defined terms and builds everything from individually defined “time scale components,” making the standard more precise and easier to implement in software.
ISO 8601-2:2019 is entirely new and provides extensions, including representations for decades and centuries (borrowed from the Extended Date/Time Format used in libraries and archives). The 2019 revision also cleaned up ambiguities in the old standard where the format notation itself was inconsistent. Previously, placeholder characters like “Y” for year and literal characters like “T” for the date-time separator looked the same on the page, which created confusion when encoding these formats programmatically.

