Leading Zeros in Dates
Leading zeros in numeric dates depend on the representation. Locale-facing dates may show month and day numbers with or without a leading zero, while fixed machine or interchange formats can require fixed-width fields.
Do not treat a leading zero as universally required in human-facing dates; follow the locale or standard, and preserve fixed-width zeros where the specified format requires them.
Key details
Important caveats
Locale Boundary
Microsoft documents that locale date formats can display month and day numbers with or without leading zeros.
Standard Boundary
When a specific technical standard defines fixed-width numeric fields, follow that standard rather than general prose style.
Further guidance
Practical Application
Follow the selected locale or specified data/interchange standard. Human-facing dates may omit a leading zero, while fixed-width machine formats can require one; do not impose one prose convention on a technical format or vice versa.
Reader Check
Is the date being displayed for readers under a locale/style convention, or encoded under a fixed technical specification?
Worked Example
A localized interface might display “9/7/2026,” while a fixed-width standard can require “09” and “07.” The governing representation decides the zeros.
Sources and evidence
Sources are shown with the role they play in this guide. Historical or style-sensitive claims are kept within the evidence boundary described above.
- Format dates and times (opens in a new tab)Microsoft Globalization · Locale-dependent date/time fields, including optional leading zeros in many human-facing formats