⏱️ Time & Productivity

Date Format Converter

Pick a date and time — copy it in any format you need.

  • 15 formatsISO, RFC, Unix, SQL…
  • 20 tokensfor custom patterns
  • Click to copyany row
  • Secondsprecision in the picker

—Custom pattern result

FormatResult

How to use the Date Formatter

  1. 1

    Pick a date and time

    It starts at the current moment; seconds can be set too.

  2. 2

    Scan the table

    ISO 8601 (local and UTC), RFC 2822, Unix seconds and milliseconds, US, UK/India, SQL and more.

  3. 3

    Write a custom pattern

    Combine tokens such as DD, MMMM, YYYY and h:mm A, with literal text in [brackets].

  4. 4

    Click to copy

    Click any row’s value to copy it to the clipboard.

Features

ISO 8601

Local with offset, and UTC with milliseconds.

RFC 2822

The style used in email headers.

Unix time

Seconds and milliseconds since 1970.

SQL DATETIME

Ready for MySQL-style inserts.

Custom patterns

Moment/Day.js-style tokens plus Z for the offset.

One-click copy

Every result row is a copy button.

Who uses it — and for what

Developers

Test values for APIs, logs and database seeds.

Analysts

Match the format a spreadsheet or import expects.

Writers

Spell out dates consistently in documents.

File naming

Compact sortable stamps such as 20270305_140709.

Common date formats

  • ISO 8601 (2026-10-14T09:30:00+05:30) — the international standard; sorts correctly as text and is used in APIs and databases.
  • RFC 2822 (Wed, 14 Oct 2026 09:30:00 +0530) — used in email headers and RSS.
  • Unix timestamp — seconds since 1 January 1970 UTC.
  • US (MM/DD/YYYY) vs European/Indian (DD/MM/YYYY) — the classic source of confusion: 04/05 is April 5 in the US and 4 May elsewhere.

Click any row to copy it.

Custom pattern tokens

Build your own format with tokens: YYYY year, YY two-digit year, MMMM month name, MMM short month, MM/M month number, DD/D day, dddd weekday, ddd short weekday, HH/H 24-hour, hh/h 12-hour, mm minutes, ss seconds, A AM/PM and Do ordinal day (14th). Text in square brackets is kept literally, e.g. [Week of] D MMMM. These are the same tokens used by Moment.js and Day.js, so patterns are easy to reuse in code.

Two tokens the list above leaves out

Besides the tokens described earlier, the pattern box understands a for lower-case am/pm and Z for the UTC offset with a colon (+05:30). So D MMM, h:mm a gives “5 Mar, 2:07 pm” and HH:mm Z gives “14:07 +05:30”. There is no token for quarters or week numbers — a Q stays as a plain letter — so use the Quarter Calculator or Week Number Calculator for those. Any letter that is a token (D, M, H, h, A, a, Z and the longer forms) is replaced wherever it appears, which is why ordinary words belong inside square brackets.

Choosing the right format for the job

  • Storing or exchanging data: ISO 8601 in UTC. It is unambiguous, sorts correctly as text and every language can parse it.
  • Showing a time to people: a spelled-out month (“5 March 2027”) avoids the 03/05 versus 05/03 trap entirely.
  • File and folder names: year first, no colons — colons are not allowed in Windows file names, so the Compact row uses YYYYMMDD_HHmmss.
  • Databases: the SQL DATETIME row has no zone, so agree whether your column stores local time or UTC.
  • Unix timestamps: seconds for most back-ends, milliseconds for JavaScript; convert the other way with the Unix Timestamp Converter.

Worked examples

One moment, many formats

5 March 2027, 2:07:09 pm on a device set to India time gives:

RowResult
ISO 8601 (local)2027-03-05T14:07:09+05:30
ISO 8601 (UTC)2027-03-05T08:37:09.000Z
RFC 2822Fri, 05 Mar 2027 14:07:09 +0530
Unix seconds1804235829
US03/05/2027 2:07 PM
UK / India05/03/2027 14:07
Compact20270305_140709

Why brackets matter

The pattern Due Date: DD/MM/YYYY comes out as 5ue 5pmte: 05/03/2027, because the single letters D and a are tokens (day and am/pm). Written as [Due Date:] DD/MM/YYYY it gives Due Date: 05/03/2027. Likewise dddd, Do MMMM YYYY [at] h:mm A gives Friday, 5th March 2027 at 2:07 PM, while leaving “at” unbracketed turns it into “pmt”.

Pro tips

  • The UTC row ends in Z and includes milliseconds — the same text JavaScript’s toISOString() produces.
  • Names of months and weekdays are always in English in the pattern output; the “Your locale” row uses your device language.
  • To check how your offset changes in summer, pick a date in July and compare the ISO and RFC rows with one in January.

Glossary

Token
A placeholder such as YYYY or MMMM that is replaced by part of the date.
Offset
The difference from UTC written as +05:30 (ISO) or +0530 (RFC 2822).
Epoch
The starting point for Unix time: 00:00:00 UTC on 1 January 1970.

Frequently asked questions

What is the ISO date format?

YYYY-MM-DD, optionally followed by T and the time, e.g. 2026-10-14T09:30:00Z.

Which time zone is used?

Your device’s time zone; ISO and RFC rows include the offset.

How do I write the month name?

Use MMMM for “October” or MMM for “Oct”.

How do I add normal words to a pattern?

Wrap them in square brackets, e.g. [Invoice date:] DD.MM.YYYY. Unbracketed letters like D, a or h are treated as tokens.

Can I get a lower-case am or pm?

Yes, use the token a; A gives AM or PM.

Found it useful? Share the Date Formatter:

Last updated 2026-11-21 · Built by Vinayak Agarwal · Part of Time & Productivity (25 tools)