Common date and time formats
| Format | Example | Best for |
|---|---|---|
| ISO 8601 | 2026-03-27T14:30:00Z | APIs, logs, databases, cross-system exchange |
| Unix timestamp | 1774621800 | Compact machine storage and event tracking |
| Readable local date | 2026-03-27 14:30 | Dashboards, exports, user-facing views |
| US style | 03/27/2026 | US office workflows and older systems |
| Day-first style | 27/03/2026 | Many international user-facing documents |
Useful formatting tokens
YYYY
Four-digit year, such as 2026.
MM
Two-digit month, from 01 to 12.
DD
Two-digit day of month.
HH:mm:ss
24-hour time with hours, minutes, and seconds.
If you work across multiple libraries, remember token syntax is not universal. For example, one formatter may use lowercase and another uppercase for months and minutes.
Timezone notes that avoid mistakes
- Z means UTC.
- +08:00 and -05:00 are fixed offsets, not daylight-saving aware location names.
- Store timestamps in UTC when possible, then display them in the user's timezone.
- Never assume 03/04/2026 is unambiguous. Prefer ISO 8601 for system exchange.
Use this reference with the right tool
Related tools