Date Formatter
This Date Formatter tool helps you convert a date into a different date format. Just enter the exact date, specify the format pattern and click on convert
button.
The Date Formatter is a simple online tool that helps you display a date based on a format. Whether you want to convert a numeric date (02/14/2024) to a textual date (14 February 2024), or the other way around, this converter will validate and format your date based on a given pattern of characters.
How to use the Date Formatter?
- Step 1
First, enter the date and/or time on the
Date and Time
input field. You can do it by directly typing them or you can click on the
Calendar icon
and select the date and/or time. - Step 2
Then, on the
Format
input field, enter the date format that you want. As a reference, you can check out the Date Format Characters table so you can run your experiments. - Step 3
Finally, click on the
Convert
button to process your conversion. The output will be displayed just below the✍ Result
heading. If you want to clear the fields, you can do that by clicking on theReset
button.
Date Format Characters
There are quite a lot of characters that makes up the combination of patterns for formatting date. However, there are just quite a short list of characters that is being commonly used. These are the characters you can use on the Date Formatter
above to get your desired date format.
Please note that on this table, we are using the as our example date and time.
Characters | Output | Details |
Weekday | ||
d | 0 | 0 to 6 number of day of the week where 0 is Sunday, 1 is Monday up to 6 which is Saturday. |
dd | Su | First 2 letters of day. Example: Su for Sunday |
ddd | Sun | First 3 letters of day. Example: Mon for Monday |
dddd | Sunday | Complete name of day |
Day | ||
D | 1 | 1 - 31 numeric calendar day of the month |
Do | 1st | 1st - 31st ordinal calendar day of the month |
DD | 01 | 01 - 31 zero-padded calendar day of the month |
DDD | 336 | 1 - 366 calendar day of the year |
DDDo | 336th | 1st - 366th ordinal calendar day of the year |
DDDD | 336 | 001 - 366 zero-padded calendar day of the year |
Month | ||
M | 12 | 1 - 12 numeric month |
MM | 12 | 1 - 12 numeric month with zero padding |
Mo | 12th | 1st - 12th ordinal month |
MMM | Dec | First 3 letters of the month name. Example: Feb for February |
MMMM | December | Full name of the month |
Year | ||
Y | 2024 | Full year |
YY | 24 | Last 2 digits of year |
YYYY | 2024 | 4 digits of year |
Week | ||
w | 49 | 1 - 53 week number of the year |
ww | 49 | 01 - 53 zero-padded week of the year |
wo | 49th | 1st - 53rd ordinal week of the year |
Hours | ||
h | 7 | 1 - 12 of the 12 hours time format |
hh | 07 | 01 - 12 zero-padded 12 hours time format |
H | 19 | 0 - 23 of the 24 hours time format |
HH | 19 | 00 - 23 zero-padded 24 hours time format |
Minutes | ||
m | 30 | 0 - 59 minutes |
mm | 30 | 00 - 59 zero-padded minutes |
s | 9 | 00 - 59 seconds |
ss | 09 | 00 - 59 zero-padded seconds |
Meridiem | ||
a | pm | am/pm in small letters |
A | PM | AM/PM in capital letters |
Timezone | ||
Z | +00:00 | UTC offset. Example: +08:00 |
ZZ | +0000 | UTC offset without semicolon. Example: +0800 |
S | 0 | 0 - 9 Deciseconds |
SS | 00 | 00 - 99 zero-padded centiseconds |
SSS | 000 | 000 - 999 zero-padded milliseconds |
Note that the characters that is used on date formats are case-sensitive. For example, the proper usage to display month in a 3-letter abbreviation is MMM where all are in capital letters. If you try to enter with small letters like mmm, you'll get a numeric result that we won't decipher what it means.
One important note as well is that date character patterns may differ from one computer system to another. So, if you are trying to figure out the date format for the system or application you are using, make sure to read it's official documentation for correct characters.
Date Format Patterns
Based on the date format characters or tokens displayed on the table above, you can now convert a date into a different format, here are commonly used date formats:
Format | Output |
MMMM Do YYYY | December 1st 2024 |
Do MMMM YYYY | 1st December 2024 |
MMMM D, YYYY | December 1, 2024 |
MMMM Do YYYY, h:mm:ss a | December 1st 2024, 7:30:09 pm |
dddd, MMMM D, YYYY, h:mm:ss a | Sunday, December 1, 2024, 7:30:09 pm |
dddd, D MMMM YYYY, h:mm:ss a | Sunday, 1 December 2024, 7:30:09 pm |
ddd, D MMM YYYY HH:MM:SS A | Sun, 1 Dec 2024 19:30:09 PM |
MM/DD/YYYY | 12/01/2024 |
YYYY-MM-DD | 2024-12-01 |
MMM D, YYYY | Dec 1, 2024 |
YYYY-MM-DDTHH:mm:ssZ | 2024-12-01T19:30:09+00:00 |
Date Formats and Date Standard
There are two types of date formats, the numeric and the textual format. Let us quickly examine these formats.
Numeric Date Format
Also commonly referred to as short date format, it is composed of numbers that represents the day, month and year. The common separators between them are forward slash (/), hyphen (-), dot (.), and open space. Although it can also be written without any separator.
When a separator (/ or -) is used, it will be called an extended numeric format. If the date is written is purely numbers without any separators, then it is referred to as basic numeric format.
Today's date in numeric format with forward slash (/) as our separator:
2024/12/03
2024
is the year.12
is the two digits month (01 being January up to 12 as December).03
is the two-digit day (01 up to 31 if applicable).
Textual Date Format
The other date format is called textual date or sometimes referred to as long date format. The notable distinction of this format against numeric one is that the month is written fully or sometimes abbreviated. The date written on this format is much easier to read by people that why it's called human-readable.
Let's take today's date and display it in textual or long format:
December 3, 2024
December
is today's month.3
is the day of the month.2024
is the complete year.
Date Format Standard (ISO 8601)
When the date is in a text format as the 5th of January 2024, it really tells the exact date. But when it is in numeric format as 01/05/2024, it could mean January 5 or May 1, 2024. To avoid this possible confusion, is there really a standard for date format?
There is an international standard for date and time format, it's called ISO 8601. The order for writing date based on ISO 8601 is from year, month, day, hour, minutes, seconds and milliseconds.
The standard format for date is YYYY-MM-DD where YYYY stands for the complete year, the MM for months padded with zero and the DD for the day padded as well with zero if necessary.
To elaborate this in a very simple way, the numeric equivalent of January 5, 2024 using the ISO 8601 is 2024-01-05.
Notice that because two-digit is required for month and day, they are being padded with zero.
This standard is often used on numeric dates. For dates in textual or long format such as January 5, 2024, where the month is written at full length or abbreviated, there are quite some versions to express it depending on your country.
Common Date Formats
These are the common date formats being date as our example:
- March 15th 2024
- March 15, 2024
- Mar 15, 2024
- 15 March 2024
- 15th March 2024
- The 15th of March in the year 2024
- Saturday, March 15, 2024
- 15/01/2024 or 15-01-2024
- 2024-01-15 or 2024/01/15
What is Date Formatter used for?
This date formatter online tool's primary purpose is to convert a date into a different format using a combination of date formatting characters to achieve the appropriate format specially if it's used on browser applications or computer programs.