Live-preview an Excel date format
Type a date and a format code — see the output instantly. No more "is it m or M? Will mm mean month or minute?". The renderer here uses the same precedence rules Excel does.
yyyy-mm-dd
dd/mm/yyyy
mm/dd/yyyy
long
short
time
12h time
datetime
Jan-26
22-Apr
Cheat sheet
Format code reference
| Code | Means | Example |
|---|---|---|
| d | Day, no padding | 7 |
| dd | Day, zero-padded | 07 |
| ddd | Short weekday | Tue |
| dddd | Full weekday | Tuesday |
| m | Month, no padding | 4 |
| mm | Month, zero-padded | 04 |
| mmm | Short month | Apr |
| mmmm | Full month | April |
| yy | 2-digit year | 26 |
| yyyy | 4-digit year | 2026 |
| h / hh | Hour (24h) | 14 / 14 |
| mm | Minute (when after h:) | 35 |
| ss | Second | 09 |
| AM/PM | 12-hour with AM/PM | PM |
The m trap: Excel infers month vs minute by what's around it. After an h, m means minute. Otherwise, it means month. If the result is wrong, swap to mm after the hour.