Date format playground

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

CodeMeansExample
dDay, no padding7
ddDay, zero-padded07
dddShort weekdayTue
ddddFull weekdayTuesday
mMonth, no padding4
mmMonth, zero-padded04
mmmShort monthApr
mmmmFull monthApril
yy2-digit year26
yyyy4-digit year2026
h / hhHour (24h)14 / 14
mmMinute (when after h:)35
ssSecond09
AM/PM12-hour with AM/PMPM

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.