Representing unknown dates in ISO 8601
How ISO 8601 handles partial, uncertain and unknown dates, what each notation changes, and where it breaks down in parsers, spreadsheets and shared text.
Dates in real records are often incomplete. A form may say only "spring 2024", an archive item may carry a year with a question mark, and a migrated spreadsheet may contain "05/??/2024". Converting these into ISO 8601 makes them sortable and machine-readable, but only if the conversion records what is actually known and does not invent the rest. This review covers what the standard offers for missing or uncertain parts, what each notation changes, and where the result stops being usable.
Is ISO 8601 notation suitable for unknown dates?
Often yes, with limits. The main benefit is that reduced-precision values such as a bare year or a year and month are part of the base standard, so they are compact, sort predictably and avoid the US month/day versus day/month confusion. The decisive tradeoff is that richer markers for unspecified digits, uncertainty and approximation come from the extensions part of the standard, which many general-purpose parsers, databases and spreadsheets do not accept. ISO 8601 is a good fit when the date is stored as text in a system you control and every consumer agrees on which features are in use. Plain-language text, or a separate precision field alongside a normal date, is preferable when the value goes to people, to tools you cannot test, or to systems that will silently fill in the missing parts.
What the standard provides
ISO 8601 is published in parts. Part 1 (2019 edition) covers the core notation. Part 2 (also 2019) adds extensions, many of which were developed from the Library of Congress Extended Date/Time Format (EDTF) work. The distinction matters, because a value that conforms to Part 2 is not automatically accepted by software that claims ISO 8601 support.
| Situation | Example | Where it comes from |
| Only the year is known | 2024 | Part 1, reduced precision |
| Year and month are known | 2024-05 | Part 1, reduced precision (extended format with hyphen) |
| Day is unknown but the position is kept | 2024-05-XX | Part 2, unspecified digits |
| Part of the year is unknown | 202X | Part 2, unspecified digits |
| Date is uncertain | 2024-05-12? | Part 2, qualifier |
| Date is approximate | 2024~ | Part 2, qualifier |
| Date is both uncertain and approximate | 2024-05-12% | Part 2, qualifier |
| Interval with an open end | 2024-05-12/.. | Part 2, open interval end |
2024 year only
2024-05 year and month
2024-05-XX day unspecified
202X last digit of year unspecified
2024-05-12? uncertain
2024~ approximate
2024-05-12% uncertain and approximate
2024-05-12/.. interval, open end
Two details trip up conversions. First, a year and month must be written with the hyphen: 2024-05 is valid, but the compact form 202405 is not, because it could be confused with a six-digit date. Second, the 2004 edition described truncated forms such as --05-12 (month and day with no year) by mutual agreement; those were dropped from the 2019 core part. If a system expects them, confirm which edition or derived specification it follows. Conventions for unknown versus open interval ends also differ between EDTF drafts and later texts, so check the exact specification before relying on them.
What the notation actually changes
Unlike a display style, this is a change to the stored characters. Converting "May 2024" to 2024-05 records the date at month precision; it does not reformat a full date for display. That is different from localization tools that render a complete stored date as 05/12/2024 for US readers or 12.05.2024 elsewhere, where the underlying value stays the same and only presentation changes.
The word "unknown" is used loosely in source data, and the notations encode distinct meanings:
- Reduced precision (2024-05): the date is only meaningful to the month; no day is implied.
- Unspecified (2024-05-XX): a specific day exists but is not recorded.
- Uncertain (?): the value given may be wrong.
- Approximate (~): the value is close but not exact.
- Open interval end (..): the range continues without a stated end, which is not the same as an end that exists but is unknown.
Choosing between these is an editorial decision about the source, not a formatting step. A tool that maps every question mark in the input to the same output loses that distinction. In the more expressive levels of the extensions, qualifiers can also attach to a single component rather than the whole date, which further increases the chance that two systems read the same string differently.
Avoid placeholder dates
A common shortcut is to store an unknown date as a sentinel such as 1900-01-01, 9999-12-31 or 0000-00-00. The first two are valid dates that will be treated as real; the third is not a valid ISO 8601 date at all, since month 00 and day 00 do not exist. Filling unknown parts with 01, as in recording "May 2024" as 2024-05-01, has the same problem: the data now claims a precision it never had. If the date is entirely unknown, leave the field empty or null and, if needed, record why.
Will the result stay readable and usable after copying or sharing?
All of the notations above use plain ASCII digits and punctuation, so the characters themselves are unlikely to be altered by copying and pasting. The risks come from how the receiving software interprets them.
- Parsers fill gaps. The ECMAScript specification accepts year-only and year-month strings in its date format and fills missing parts, so a JavaScript Date built from 2024-05 represents the first moment of May 1, in UTC. The precision is lost the moment the value becomes a date object.
- Extension syntax is often rejected. Values containing X, ?, ~ or % may fail to parse in tools that only support the core standard. Test each parser and database you depend on rather than assuming support.
- Spreadsheets may convert values. A partial date pasted into a spreadsheet may be turned into a full date or a number unless the column is set to text. Behavior varies by application and settings.
- Sorting is only partly reliable. Text sorting of core-format values in the same format works well, but 2024 sorts before 2024-01-01 regardless of meaning, and because X and the qualifiers sort after digits in ASCII, 2024-XX lands after 2024-12.
- Search may miss partial values. A filter or search on a full date range may not match a stored year-only or masked value unless the system is built to handle precision.
For people, these strings are less readable than they look. A notation like 2024-05-XX? is clear to someone who knows the extensions and puzzling to anyone else. How screen readers announce characters such as X, ~ and % has not been verified here and likely depends on the product and its punctuation settings, so it should not be assumed that the intended meaning reaches listeners. Wherever a date is shown to readers, pair the coded value with a plain-text equivalent such as "May 2024, day unknown" or "around 2024 (uncertain)".
When plain text or a separate field is the better choice
- The audience is general readers rather than systems or specialists.
- The value will pass through tools you cannot test, such as third-party imports or email.
- The source wording carries nuance, like "before the war" or "early spring", that no notation captures faithfully.
- Your database needs a true date type for indexing; store a normal date plus an explicit precision or certainty field rather than overloading the date string.
Evidence gaps
No tool-specific test results or documentation for particular converters were supplied for this review, so no claims are made about how any named date-conversion tool handles partial or uncertain input. Statements about the standard reflect its published structure; behavior in specific spreadsheets, databases and assistive technologies should be confirmed with a scoped test in the environment where the dates will be used.