Date formats differ between countries and tools. ISO 8601 (2026-12-03) is the safest format for sharing and sorting, because it sorts correctly as text.
ISO 8601
- 2026-12-03: year-month-day
- 2026-12-03T12:30:00: date and time
- 2026-12-03T12:30:00+06:00: with a time zone offset
Common codes in code
- %Y: four-digit year (2026)
- %m: two-digit month (12)
- %d: two-digit day (03)
- %H:%M: hour and minute on a 24-hour clock
- %b: short month name (Dec)
Caution
- 03/12/2026 means 3 December in most countries and 12 March in the US
- Always write the year in full