← All guides

Choosing inputs · Input explainer

Turn an ambiguous date into an unambiguous one

See the two readings of 04/05/2026, ask for confirmation, then convert the confirmed date to YYYY-MM-DD and check that the day and month stayed in place.

A note says 04/05/2026. In this illustrative example, you need to add it to a booking list that uses YYYY-MM-DD. Before moving the numbers, there is one missing input: which part of the original note is the day?

Replacing slashes with hyphens will not answer that question. A spreadsheet’s default interpretation cannot confirm the writer’s intention either. First establish what the note means; then change how the confirmed date is written.

Two readings, two different dates

For this note, both day-first and month-first readings produce a possible calendar date:

Original conventionWhat the parts meanDate in wordsAfter confirmation
DD/MM/YYYY: day, month, yearDay 04, month 05, year 20264 May 20262026-05-04
MM/DD/YYYY: month, day, yearMonth 04, day 05, year 20265 April 20262026-04-05

The year is the same in both readings. The uncertainty is between April and May, not between two ways of displaying the same day. Either converted value would look tidy, but tidiness would not make an unsupported choice correct.

The note alone does not tell you which row to use. A familiar convention, the recipient’s location or a software default is not confirmation of the convention used by the person who wrote it.

Ask a question that names both dates

Ask the person who supplied the note:

Does “04/05/2026” mean 4 May 2026 or 5 April 2026?

Writing the month in words keeps the question from repeating the original ambiguity. Asking only “Is this date correct?” is less useful: someone could say yes while reading the numbers in a different order.

If you also need to process other dates from the same source, ask whether the confirmed convention applies throughout. Confirmation of one entry is not, by itself, proof that every entry follows the same pattern.

Until you have an answer or a reliable statement of the source convention, retain 04/05/2026 as the original text and mark the interpretation as awaiting confirmation. If a system requires a single date, resolve the uncertainty before entering one; do not guess to fill a required field.

Convert the confirmed meaning, not the characters

Suppose the person who supplied the note confirms 4 May 2026. That confirmation supplies the missing meaning:

  • Year: 2026
  • Month: May, written numerically as 05
  • Day: 4, written with two digits as 04

The requested pattern is YYYY-MM-DD: four digits for the year, two for the month and two for the day, separated by hyphens. Put the identified parts into those positions:

2026 + “-” + 05 + “-” + 04 = 2026-05-04

The leading zeros fill the two-digit month and day positions. They do not change which part is the month.

If the confirmation had instead been 5 April 2026, the month would be 04 and the day 05, giving 2026-04-05. These are alternatives, not interchangeable outputs. For the actual note, neither should be selected without supporting confirmation.

Read the result back before using it

Check the converted date independently by reading its labelled positions, rather than asking whether it looks plausible.

For the illustrative confirmed result 2026-05-04:

  1. The first four digits give the year: 2026.
  2. The middle pair gives the month: 05, or May.
  3. The final pair gives the day: 04, or 4.
  4. Read it aloud as 4 May 2026 and compare that with the confirmation.

This catches a swap that a simple calendar-validity check would miss: 2026-04-05 is also a possible date, but it is not the confirmed 4 May.

Leave a short, checkable record

For the illustrative booking-list handoff, a useful record would be:

Original note: 04/05/2026. The person who supplied it confirmed the intended date as 4 May 2026. Entered as: 2026-05-04.

Use that wording only once the confirmation has actually happened. Keeping the original text and the confirmed meaning together lets the next person check the conversion without having to guess what the slashes meant. Retain the confirmation message too, where your record-keeping arrangements allow it.

For an unresolved entry, use: “04/05/2026 — interpretation awaiting confirmation.” That is a pending input, not a converted date.

If the source is unclear, incomplete or contains an impossible date, ask for clarification rather than silently correcting it. A reliable conversion preserves a known date; it does not guess an unknown one.