Skip to content
ConvertMyStuff
Resource

ISO 8601 Date Format Explained

ISO 8601 standardizes dates as YYYY-MM-DD and times with optional timezone offsets for unambiguous exchange.

Time & Date ToolsRelated tool: Date Difference Calculator

Quick answer

ISO 8601 dates: YYYY-MM-DD (2026-05-23). Datetimes: YYYY-MM-DDTHH:mm:ss with optional offset +00:00 or Z for UTC. Format sorts lexicographically chronologically. Prefer ISO over MM/DD/YYYY in APIs and filenames to avoid locale ambiguity.

Use the tool

Convert or calculate with our free date difference calculator.

Overview

US-written 03/04/2024 confuses Europeans (April 3 vs March 4). ISO 8601 puts largest unit first—year, month, day—so string sort matches time order and human parsing stays unambiguous internationally. APIs standardize on ISO UTC instants; local offsets appended when needed. CSV exports and log aggregation benefit from ISO date prefixes in filenames (`2026-05-23-export.json`). Excel and Sheets import ISO strings reliably when cell format set text or proper locale import wizard. Duration format PT1H30M also exists in ISO 8601 for intervals separate from calendar datetimes.

Calendar date form

YYYY-MM-DD zero-padded month and day: 2026-05-03 not 2026-5-3 in strict interchange though parsers often lenient.

Week date form 2026-W21-5 exists rarely in consumer apps—know W format if logistics APIs use it.

Combined date and time

Separator T between date and time: 2026-05-23T14:30:00. Fractional seconds optional .123. Offset +02:00 or Z suffix for UTC.

Without offset, datetime is 'local' or 'floating'—avoid in cross-system contracts lacking zone context.

Sorting and filename conventions

Lexicographic sort on ISO date strings equals chronological sort—use in backup filenames, report exports, photo archives instead of MM-DD-YYYY.

Database DATE columns map cleanly; store TIMESTAMP WITH TIME ZONE in Postgres for instants.

Parsing in code and spreadsheets

JavaScript Date.parse generally accepts ISO subset; prefer explicit libraries (date-fns, Temporal) for edge cases. Excel VALUE() may misparse if locale not set—import as text then convert.

Validate regex for API input: ^\d{4}-\d{2}-\d{2}$ for date-only endpoints.

Durations and intervals

ISO duration P1Y2M3DT4H5M6S mixes calendar and clock components—complex for billing; many apps use total seconds internally instead.

Date difference tools compute civil day spans between calendar dates handling inclusive/exclusive end date policies explicitly.

Examples

  • API timestamp field

    "updatedAt": "2026-05-23T18:45:00Z" — unambiguous UTC instant for all clients.

  • Filename sort

    logs-2026-05-23.json sorts before logs-2026-06-01.json alphabetically chronologically.

Common mistakes and edge cases

  • Using MM/DD/YYYY in international API payloads.
  • Omitting timezone on cross-border scheduled events.
  • Non-zero-padded months breaking strict parsers.
  • Confusing ISO date with US Excel serial date numbers.

Related resources

Related tools

Last reviewed: 2026-05-23