The ISO 8601 standard defines an internationally recognized format for representing dates and times. For times, they are expressed with the notation hours-minutes-seconds. In the case of dates, the format is year-month-day. This basic format enables the numbers to be written directly after another. For greater clarity, they can also be separated by delimiters. According to the basic format of ISO 8601, the date “September 7, 2019” is written as follows: “20190907”, or when expressed with delimiters: “2019-09-07”. Times are divided into hours, minutes, and seconds. An ISO 8601 timestamp would therefore be: 12:07:22. The representation of ISO date formats does away with the need for country-specific notations, at least in electronic formats. This way, time and date information is standardized, resulting in fewer communication issues.
The ISO 8601 standard is also known as ANSI INCITS 30-1997 (R2008) or NIST FIPS PUB 4-2 in the United States. What’s more, it’s not only used for time values but also for durations. In such cases, the start date or time is separated from the following duration by the letter “P”. A duration that begins on September 6, 2019 at 8:00 pm and lasts one month, five days, and three hours would be expressed per the ISO standard as follows: 2019-09-06T20P1M5T3H.
According to the ISO standard, all values like times, dates or durations are shown in a certain order: They start with the largest unit and proceed to the next smaller value. This sequence is known as “descending notation”. It corresponds with the natural mathematic value of numbers. Larger units are therefore always written before smaller units. This is advantageous as it means the lexicographical and chronological sorting of dates and times will produce the same result.