1. Format a Date as Month Year or ISO Date With TEXT
Use TEXT(date_cell, "format_code") to turn a date into formatted text—helpful when combining dates into labels or summary headers:
=TEXT(A2, "mmm yyyy")
2. Pad Numbers With Leading Zeros
Supply zeros in the format pattern to keep leading zeros on codes, order numbers, or 5-digit ZIP codes (for example, "00000"):
=TEXT(A2, "00000")
Worked Example: Date & Leading-Zero Formats
Input Value (A2) |
Format Pattern | TEXT Output |
|---|---|---|
2026-11-27 |
"mmm yyyy" |
Nov 2026 |
2026-11-27 |
"yyyy-mm" |
2026-11 |
42 |
"00000" |
00042 |