Date Format Converter

Paste or type a date in almost any form. The converter says how it read it, then shows the same date in every common format, each with a copy button.

ISO 8601, RFC 2822, US and European numeric dates, written dates in English, Unix timestamps, or the words now, today, tomorrow and yesterday. Try one:
Used to read input that has no UTC offset of its own, and to show the results.

The way your input was read appears here once the page has loaded.

ISO 8601 and internet standards

  • ISO 8601 date...
  • ISO 8601 date and time, local...
  • ISO 8601 with UTC offset...
  • ISO 8601 in UTC...
  • ISO 8601 in UTC with milliseconds...
  • RFC 3339...
  • RFC 2822 (email)...
  • HTTP date (always GMT)...
  • ISO week date...
  • Ordinal date (year and day of the year)...

Numeric and written dates

  • US numeric (MM/DD/YYYY)...
  • European numeric (DD/MM/YYYY)...
  • European with dots (DD.MM.YYYY)...
  • Year first (YYYY/MM/DD)...
  • Compact (YYYYMMDD)...
  • Long, en-US...
  • Full, en-US...
  • Abbreviated, en-US...
  • Long, day first...

Timestamps and serial numbers

  • Unix time, seconds...
  • Unix time, milliseconds...
  • SQL DATETIME...
  • Excel serial date number...
  • Julian Day Number...
  • Julian date (UTC, with fraction)...
  • Modified Julian Date...

Time of day and your locale

  • Time, 12-hour...
  • Time, 24-hour...
  • UTC offset...
  • Relative to now...
  • Full, your locale (browser language)...
  • Long, your locale (browser language)...
  • Short, your locale (browser language)...

Dates follow the proleptic Gregorian calendar, years 1 to 9999. Written forms use English month and weekday names. Extra rows in your own language appear when your browser is not set to US English.

Custom format pattern

Build your own format from the tokens below. It is applied to the date entered above. Put literal text in [square brackets].
Result ...

Pattern tokens

Examples are for Thursday, July 9, 2026 at 3:05:09.250 PM, UTC-04:00.

TokenMeaningExample
YYYYYear, four digits2026
YYYear, last two digits26
MMMMMonth nameJuly
MMMMonth name, three lettersJul
MMMonth number, two digits07
MMonth number7
DDDay of the month, two digits09
DDay of the month9
DoDay of the month with its ending9th
ddddWeekday nameThursday
dddWeekday name, three lettersThu
[text]Literal text, copied as it ison 9
XUnix time in seconds1783623909
TokenMeaningExample
HHHour, 24-hour clock, two digits15
HHour, 24-hour clock15
hhHour, 12-hour clock, two digits03
hHour, 12-hour clock3
mmMinutes, two digits05
mMinutes5
ssSeconds, two digits09
sSeconds9
SSSMilliseconds250
AAM or PMPM
aam or pmpm
ZUTC offset with a colon-04:00
ZZUTC offset without a colon-0400

The tokens follow the style of Moment.js and Day.js. Patterns written the Java or .NET way also work for the common cases: yyyy, yy, dd, d, EEEE and EEE are read as YYYY, YY, DD, D, dddd and ddd, and text in 'single quotes' is literal. x gives Unix time in milliseconds. Any other character is copied unchanged.

Format strings in common languages

The same output needs a different pattern in almost every language. Each table gives the pattern that prints the example in its column heading. The notes under the tables list the few cases where a language cannot match it exactly.

Numeric dates

Language2026-11-2711/27/202627/11/202627.11.2026
strftime (C, Python, Ruby)%Y-%m-%d%m/%d/%Y%d/%m/%Y%d.%m.%Y
Java, Kotlin (DateTimeFormatter)yyyy-MM-ddMM/dd/yyyydd/MM/yyyydd.MM.yyyy
C#, .NETyyyy-MM-ddMM/dd/yyyydd/MM/yyyydd.MM.yyyy
JavaScript (date-fns)yyyy-MM-ddMM/dd/yyyydd/MM/yyyydd.MM.yyyy
JavaScript (Day.js, Moment.js)YYYY-MM-DDMM/DD/YYYYDD/MM/YYYYDD.MM.YYYY
PHP date()Y-m-dm/d/Yd/m/Yd.m.Y
Go (time.Format)2006-01-0201/02/200602/01/200602.01.2006
MySQL DATE_FORMAT%Y-%m-%d%m/%d/%Y%d/%m/%Y%d.%m.%Y
PostgreSQL to_charYYYY-MM-DDMM/DD/YYYYDD/MM/YYYYDD.MM.YYYY
Excel, Google Sheets (TEXT, cell format)yyyy-mm-ddmm/dd/yyyydd/mm/yyyydd.mm.yyyy

Written dates

LanguageNovember 27, 2026Friday, November 27, 202627 Nov 2026
strftime (C, Python, Ruby)%B %-d, %Y%A, %B %-d, %Y%d %b %Y
Java, Kotlin (DateTimeFormatter)MMMM d, yyyyEEEE, MMMM d, yyyydd MMM yyyy
C#, .NETMMMM d, yyyydddd, MMMM d, yyyydd MMM yyyy
JavaScript (date-fns)MMMM d, yyyyEEEE, MMMM d, yyyydd MMM yyyy
JavaScript (Day.js, Moment.js)MMMM D, YYYYdddd, MMMM D, YYYYDD MMM YYYY
PHP date()F j, Yl, F j, Yd M Y
Go (time.Format)January 2, 2006Monday, January 2, 200602 Jan 2006
MySQL DATE_FORMAT%M %e, %Y%W, %M %e, %Y%d %b %Y
PostgreSQL to_charFMMonth FMDD, YYYYFMDay, FMMonth FMDD, YYYYDD Mon YYYY
Excel, Google Sheets (TEXT, cell format)mmmm d, yyyydddd, mmmm d, yyyydd mmm yyyy

Times and timestamps

Language2026-11-27 14:30:0502:30 PM2026-11-27T14:30:05-05:00
strftime (C, Python, Ruby)%Y-%m-%d %H:%M:%S%I:%M %p%Y-%m-%dT%H:%M:%S%z
Java, Kotlin (DateTimeFormatter)yyyy-MM-dd HH:mm:sshh:mm ayyyy-MM-dd'T'HH:mm:ssXXX
C#, .NETyyyy-MM-dd HH:mm:sshh:mm ttyyyy-MM-dd'T'HH:mm:sszzz
JavaScript (date-fns)yyyy-MM-dd HH:mm:sshh:mm ayyyy-MM-dd'T'HH:mm:ssxxx
JavaScript (Day.js, Moment.js)YYYY-MM-DD HH:mm:sshh:mm AYYYY-MM-DDTHH:mm:ssZ
PHP date()Y-m-d H:i:sh:i AY-m-d\TH:i:sP
Go (time.Format)2006-01-02 15:04:0503:04 PM2006-01-02T15:04:05-07:00
MySQL DATE_FORMAT%Y-%m-%d %H:%i:%s%h:%i %pNo code for an offset
PostgreSQL to_charYYYY-MM-DD HH24:MI:SSHH12:MI AMYYYY-MM-DD"T"HH24:MI:SSTZH:TZM
Excel, Google Sheets (TEXT, cell format)yyyy-mm-dd HH:mm:sshh:mm AM/PMNo code for an offset
  • Month and weekday names come out in the language of the formatter's locale. The examples assume English.
  • strftime: %-d is the day without a leading zero. It works on Linux and macOS. On Windows write %#d. %z prints the offset without a colon, as -0500. Ruby and Python 3.12 or later also accept %:z, which prints -05:00.
  • Java: XXX prints Z for a zero offset. Use xxx to print +00:00.
  • .NET treats / and : as the culture's own separators. Format with CultureInfo.InvariantCulture to keep them as written. zzz is meant for DateTimeOffset values.
  • Go's layout is itself a date: the reference time Mon Jan 2 15:04:05 MST 2006.
  • MySQL's DATETIME type stores no offset, so DATE_FORMAT has no code for one. PostgreSQL's TZH and TZM need version 11 or later and a timestamp with time zone value.
  • Excel and Google Sheets: put the pattern in a formula, as in =TEXT(A1,"yyyy-mm-dd"), or use it as the cell's own format (Ctrl and 1 in Excel, then Custom). mm means minutes when it comes right after the hour or right before the seconds. Google Sheets reads hh as a 12-hour clock, so the 24-hour pattern uses HH, which Excel reads the same way. A spreadsheet date has no time zone. Excel in another language can use its own letters: the German version writes TT.MM.JJJJ.

What you can paste in

The converter tries the strict forms first and the looser ones after that. It always says which reading it chose, so you never have to trust a silent guess.

Kind of inputExamples
ISO 8601 and RFC 33392026-11-27
2026-11-27T14:30:00Z
2026-11-27T14:30:00.250-05:00
20261127T143000Z
ISO week dates and ordinal dates2026-W48-5
2026-331
SQL style2026-11-27 14:30:00
RFC 2822 and HTTP datesFri, 27 Nov 2026 14:30:00 -0500
Fri, 27 Nov 2026 19:30:00 GMT
Numeric dates11/27/2026
27/11/2026
27.11.2026
2026/11/27
Written dates in EnglishNovember 27, 2026
27 Nov 2026
Friday, November 27th, 2026 at 2:30 PM
What JavaScript prints for a dateFri Nov 27 2026 14:30:00 GMT-0500 (Eastern Standard Time)
Unix timestamps1795789800 (seconds)
1795789800000 (milliseconds)
Wordsnow, today, tomorrow, yesterday

A bare number with up to 11 digits is read as Unix seconds. With 12 to 14 digits it is read as milliseconds. Longer numbers are read as microseconds or nanoseconds. Eight digits that form a real date, such as 20261127, are read as a date. Put @ in front to force the timestamp reading: @20261127.

Some inputs leave things out. A date with no time is treated as a calendar date, and midnight is used where a result needs a time. A time with no UTC offset is read in the time zone you picked. A two-digit year follows the usual computing rule: 00 to 68 mean 2000 to 2068, and 69 to 99 mean 1969 to 1999.

Why date formats differ between countries

Three orders are in everyday use. Each one is normal for a large part of the world.

OrderExampleWhere people write it
Day, month, year27/11/2026
27.11.2026
Most of Europe, Latin America, Africa, South Asia, Australia and New Zealand
Month, day, year11/27/2026The United States
Year, month, day2026-11-27
2026/11/27
China, Japan, Korea, Hungary, Lithuania and Sweden. It is also the order of ISO 8601.
Postcards, letters and small parcels from several countries lie on a table next to a globe.
A letter from Germany may be dated 27.11.2026 and one from the United States 11/27/2026. Both mean the same day, so check where a date was written before you read it.

Day first is the most common order in the world. Month first follows the way Americans say a date aloud: "November 27, 2026".

The separators vary too. Germany and much of central Europe write dots (27.11.2026). Britain and France write slashes (27/11/2026). The Netherlands writes hyphens (27-11-2026). None of these habits is wrong. The trouble starts when a date written one way is read the other way.

The MM/DD and DD/MM trap

03/04/2026 is March 4 to an American reader and April 3 to almost everyone else. Nothing in the text says which one was meant. For the first twelve days of every month both readings are real dates, so software cannot catch the mistake either.

That makes 132 date strings a year that can be swapped without any error. They are the pairs of day and month from 1 to 12, leaving out the twelve where both numbers are the same.

From the 13th onward the problem shows itself, because 27/11 can only be day first. This is why a mix-up like this passes a quick test and then turns up in the first days of a month.

There are two safe ways out. In text meant for people, write the month as a word: 4 March 2026 or March 4, 2026 cannot be misread. In data, file names and anything a program will read, use ISO 8601: 2026-03-04.

When this converter meets a date that could be either, it shows a warning and lets you choose. It starts from the order your browser's language normally uses. Dates written with dots start as day first, because that is how dotted dates are written almost everywhere.

ISO 8601 explained

ISO 8601 is the international standard for writing dates and times. It was first published in 1988, and the current edition is from 2019. The rules are short. The largest unit comes first, every field has a fixed width, and only numbers are used.

PartExampleWhat it means
Calendar date2026-11-27A four-digit year, a two-digit month and a two-digit day
Time14:30:00Hours, minutes and seconds on the 24-hour clock
Date and time2026-11-27T14:30:00The letter T joins the date and the time
UTC2026-11-27T14:30:00ZThe letter Z at the end means the time is in UTC
Offset2026-11-27T14:30:00-05:00This time is five hours behind UTC
Week date2026-W48-5Day 5 (Friday) of week 48. Weeks start on Monday, and week 1 is the week with the first Thursday of the year.
Ordinal date2026-331The 331st day of 2026
Basic format20261127T143000ZThe same fields with no separators

The fields run from largest to smallest and never change width. So ISO 8601 dates sort correctly as plain text, and no reader will swap the day and the month. That is why databases, APIs, log files and file names use it.

One detail matters more than the rest. A date and time without a Z or an offset is a local time. It does not name one exact moment until you know the zone it was written in. This page always states the zone it used.

RFC 3339 and RFC 2822

RFC 3339 was published in 2002. It is the internet's profile of ISO 8601. It keeps a small part of the standard, so every timestamp has the same shape: a full date, a time and an offset, as in 2026-11-27T14:30:00-05:00. It also allows a space in place of the T. When a JSON API says it uses ISO 8601, it nearly always means RFC 3339.

RFC 2822 was published in 2001. It defines the date line of an email header: Fri, 27 Nov 2026 14:30:00 -0500. The weekday is optional. The month is a three-letter English short form, and the offset has no colon. It replaced RFC 822 from 1982. Its own successor, RFC 5322, kept the format.

HTTP headers use a stricter relative that is always in GMT: Fri, 27 Nov 2026 19:30:00 GMT.

12-hour and 24-hour time

A traveler in a busy airport hall looks up at a departures screen beside a large round clock.
Airline and train times in most countries use the 24-hour clock. A flight at 00:15 leaves just after midnight, at the very start of its date.

The 24-hour clock numbers the hours from 00 to 23 and needs no AM or PM. 14:30 is half past two in the afternoon. It is the usual written form in most of the world and the only one ISO 8601 allows. The 12-hour clock with AM and PM is the everyday form in the United States.

To convert, add 12 to the PM hours other than 12, and turn 12 AM into 00. So 2:30 PM is 14:30, 12:15 AM is 00:15, and 12:15 PM stays 12:15.

Midnight and noon are where the mistakes happen. 12:00 AM is midnight at the start of the day, and 12:00 PM is noon. Many people are unsure about that. A deadline is safer written as 11:59 PM, as "noon" or "midnight", or in 24-hour time.

Date formats in JavaScript

JavaScript reads and writes ISO 8601 without any library. A few details catch people out.

  • new Date("2026-11-27") is read as midnight UTC, but new Date("2026-11-27T00:00") is read as midnight local time. West of UTC the date-only form can show up as the day before.
  • toISOString() always gives UTC with milliseconds: 2026-11-27T14:30:00.000Z.
  • getMonth() counts from 0, so January is 0 and November is 10.
  • toLocaleDateString("en-US") gives 11/27/2026. With "en-GB" you get 27/11/2026, and with "de-DE" you get 27.11.2026.
  • Strings in other forms, such as 11/27/2026, are not parsed the same way in every browser. Pass ISO 8601 to be safe.

Unix time, Excel serials and Julian days

Unix time is the number of seconds since January 1, 1970, 00:00:00 UTC, not counting leap seconds. One number names the same moment in every time zone. The Unix timestamp converter works with it in both directions. On this page it is accepted as input and shown as one of the results.

A beige 1980s desktop computer with floppy disks and a rotary phone on a metal office desk.
Excel still counts a February 29, 1900 that never happened. The error came from an older spreadsheet program and was kept so old files would open the same way.

An Excel serial date number counts days from the start of 1900. January 1, 1900 is 1, each day adds one, and the time of day is a fraction, so .5 is noon. Excel's count includes a February 29, 1900 that never existed. The quirk was kept so that old Lotus 1-2-3 files still worked. Because of it, every serial from March 1, 1900 onward is one higher than a true day count. A serial has no time zone. The number shown here uses the date and time in the zone you selected.

The Julian Day Number is the day count astronomers use. It starts at noon UTC on January 1, 4713 BC in the Julian calendar, and January 1, 2000 is day 2,451,545. The Julian date adds the time of day as a fraction. Its days start at noon, so midnight UTC ends in .5. The Modified Julian Date subtracts 2,400,000.5 so that its days start at midnight.

Frequently asked questions

What date format does the United States use?

Month, day, year. In numbers that is MM/DD/YYYY, so November 27, 2026 is written 11/27/2026. Most other countries put the day first and write the same date as 27/11/2026.

What is the ISO 8601 date format?

It is YYYY-MM-DD: a four-digit year, a two-digit month and a two-digit day, joined by hyphens, as in 2026-11-27. With a time it becomes 2026-11-27T14:30:00. A Z for UTC or an offset such as -05:00 can follow.

How do I convert MM/DD/YYYY to DD/MM/YYYY?

Swap the first two numbers: 11/27/2026 becomes 27/11/2026. Or paste the date into the box at the top. The "European numeric" row gives the result, next to every other format.

Is 03/04/2026 March 4 or April 3?

It depends on who wrote it. In the United States it is March 4. In most other countries it is April 3. The text itself cannot tell you, so the converter flags it and asks. To avoid the question, write 2026-03-04 or spell out the month.

What do the T and the Z mean in 2026-11-27T14:30:00Z?

The T separates the date from the time. The Z means the time is in UTC, which has a zero offset. People read it aloud as "Zulu". A timestamp that ends in -05:00 is five hours behind UTC.

How do I convert a Unix timestamp to a date?

Paste the number. Up to 11 digits are read as seconds since January 1, 1970 UTC, and 12 to 14 digits are read as milliseconds. The results show the date in your time zone and in UTC.

What is the Excel serial number for a date?

It is the number of days since the start of 1900, with January 1, 1900 as day 1. January 1, 2000 is 36526. Enter any date and the "Excel serial date number" row shows its serial. When you give a time, the time of day is added as a decimal fraction.

Which date format should I use in a file name or a database?

Use ISO 8601 with the year first: 2026-11-27, or 20261127 where hyphens are not wanted. It sorts in date order as plain text. It also cannot be misread as a different day and month.

Related tools