← Back to tools
Date Format Tester
Test date format patterns for strftime, date-fns, Moment.js, Go, and Java. Enter a date and pattern to see the formatted output instantly.
Common Formats Preview
| Format | Pattern | Output |
|---|---|---|
| ISO 8601 | %Y-%m-%dT%H:%M:%S%z | 2026-03-19T05:58:07+0000 |
| US Date | %m/%d/%Y | 03/19/2026 |
| EU Date | %d/%m/%Y | 19/03/2026 |
| Full Date + Time | %A, %B %-d, %Y %I:%M %p | Thursday, March 19, 2026 05:58 AM |
| Short Date + Time | %Y-%m-%d %H:%M:%S | 2026-03-19 05:58:07 |
| Time Only (12h) | %I:%M:%S %p | 05:58:07 AM |
| Time Only (24h) | %H:%M:%S | 05:58:07 |
| RFC 2822 | %a, %d %b %Y %H:%M:%S %z | Thu, 19 Mar 2026 05:58:07 +0000 |
Click a row to use that pattern
Token Reference — strftime (Python, PHP, Ruby)
| Token | Description | Example |
|---|---|---|
| %Y | 4-digit year | 2026 |
| %y | 2-digit year | 26 |
| %m | Month (01–12) | 03 |
| %-m | Month (1–12) | 3 |
| %B | Full month name | March |
| %b | Abbreviated month | Mar |
| %d | Day (01–31) | 18 |
| %-d | Day (1–31) | 18 |
| %A | Full weekday | Wednesday |
| %a | Abbreviated weekday | Wed |
| %H | Hour 24h (00–23) | 14 |
| %I | Hour 12h (01–12) | 02 |
| %M | Minute (00–59) | 05 |
| %S | Second (00–59) | 09 |
| %p | AM/PM | PM |
| %z | UTC offset | +0100 |
| %Z | Timezone name | EST |
| %j | Day of year (001–366) | 077 |
| %w | Weekday (0=Sun) | 3 |
| %s | Unix timestamp | 1774070400 |
| %% | Literal % | % |
Quick Reference
strftime — Python (datetime.strftime), PHP (strftime), Ruby (Time#strftime), C. Unicode — date-fns (format), Moment.js, Day.js. Go — uses reference time Mon Jan 2 15:04:05 MST 2006. Java — SimpleDateFormat, Kotlin, Scala.