Date & Time Format Reference
Common formats, standards, and format tokens
Common Format Examples
| Format | Example | Description |
|---|---|---|
| YYYY-MM-DDTHH:mm:ss.sssZ | 2024-03-31T14:30:00.000Z | ISO 8601 full (UTC) |
| YYYY-MM-DDTHH:mm:ssZ | 2024-03-31T14:30:00+05:30 | ISO 8601 with offset |
| YYYY-MM-DDTHH:mm:ss | 2024-03-31T14:30:00 | ISO 8601 local (no tz) |
| YYYY-MM-DD | 2024-03-31 | ISO date only |
| HH:mm:ss | 14:30:00 | ISO time only (24h) |
| Ddd, DD Mon YYYY HH:mm:ss Z | Sun, 31 Mar 2024 14:30:00 +0000 | RFC 2822 / email |
| Ddd Mon DD YYYY HH:mm:ss Z | Sun Mar 31 2024 14:30:00 GMT+0000 | JavaScript toString() |
| MM/DD/YYYY | 03/31/2024 | US format |
| DD/MM/YYYY | 31/03/2024 | European format |
| DD-MM-YYYY | 31-03-2024 | Dash-separated EU |
| YYYY/MM/DD | 2024/03/31 | Asian / ISO-like |
| MMMM D, YYYY | March 31, 2024 | Long English |
| MMM D, YYYY | Mar 31, 2024 | Short English |
| D MMMM YYYY | 31 March 2024 | European long |
| 1711843200 | 1711843200 | Unix epoch (seconds) |
| 1711843200000 | 1711843200000 | Unix epoch (milliseconds) |
JavaScript / Intl Format Tokens
| Option | Values | Example output |
|---|---|---|
| year | "numeric" | "2-digit" | 2024 | 24 |
| month | "numeric" | "2-digit" | "long" | "short" | "narrow" | 3 | 03 | March | Mar | M |
| day | "numeric" | "2-digit" | 31 | 31 |
| weekday | "long" | "short" | "narrow" | Sunday | Sun | S |
| hour | "numeric" | "2-digit" | 2 PM | 02 PM |
| minute | "numeric" | "2-digit" | 5 | 05 |
| second | "numeric" | "2-digit" | 7 | 07 |
| timeZoneName | "short" | "long" | "shortOffset" | IST | India Standard Time | GMT+5:30 |
| hour12 | true | false | 2:30 PM | 14:30 |
Python strftime / strptime Tokens
| Token | Meaning | Example |
|---|---|---|
| %Y | 4-digit year | 2024 |
| %y | 2-digit year | 24 |
| %m | Month (01–12) | 03 |
| %B | Month name (full) | March |
| %b | Month name (abbr) | Mar |
| %d | Day (01–31) | 31 |
| %A | Weekday (full) | Sunday |
| %a | Weekday (abbr) | Sun |
| %j | Day of year (001–366) | 091 |
| Token | Meaning | Example |
|---|---|---|
| %H | Hour 24h (00–23) | 14 |
| %I | Hour 12h (01–12) | 02 |
| %M | Minute (00–59) | 30 |
| %S | Second (00–59) | 00 |
| %p | AM or PM | PM |
| %Z | Timezone name | UTC |
| %z | UTC offset | +0530 |
| %f | Microseconds | 000000 |
| %s | Unix timestamp | 1711843200 |
ISO 8601 Duration Format
| Duration | Example | Meaning |
|---|---|---|
| PnYnMnDTnHnMnS | P1Y2M3DT4H5M6S | 1yr 2mo 3d 4hr 5min 6sec |
| PTnH | PT2H | 2 hours |
| PTnM | PT30M | 30 minutes |
| PnD | P7D | 7 days |
| PnW | P2W | 2 weeks |
Learn more in the ISO 8601 guide or use the DateTime Tools to convert and detect formats.
Online DateTime & Timezone Converter
io9.me DateTime Tools is a suite of date and time utilities for developers. Convert between timezones, decode Unix epoch timestamps, detect and parse date string formats, calculate the difference between two dates, and convert between ISO 8601, RFC 2822, and other formats.
Available tools
- Timezone Converter — convert a date and time from one timezone to another with a built-in world clock
- Epoch Converter — convert Unix timestamps (seconds or milliseconds) to human-readable dates and vice versa
- Format Detector — paste a date string and detect its format (ISO 8601, RFC 2822, etc.)
- Date Calculator — calculate the number of days, hours, and minutes between two dates, or add/subtract durations
- Format Converter — convert a date between ISO 8601, RFC 2822, Unix timestamp, and custom patterns
How to use
- Select a tool tab: Timezone, Epoch, Format, Calculator, or Converter.
- Enter a date, timestamp, or date string.
- The result is calculated instantly.
Common use cases
Convert API timestamps to your local timezone, debug epoch values in log files, determine the format of date strings from external systems, calculate SLA durations between events, and convert dates for international users.