How to Change WordPress Date Format: 3 Easy Steps
Are you interested in customizing your WordPress date format and time?
WordPress displays the post date and time automatically by default.
You can change WordPress date format in a few easy steps. It is possible to create your own custom WordPress date format.
The purpose of this article is to teach you how to change or customize the date and time format of your WordPress blog or website.
Why Create a Custom WordPress Date Format
Sometimes, the default date format of WordPress does not align with your website design and blog. It may decrease the look of your website.
WordPress allows you to easily customize the default date format, which suits your theme and the design of your website and blog.
How to Change the Date and Time Format in WordPress
In the WordPress dashboard, go to Settings -> General.
First Log in to the WordPress Dashboard
In the WordPress dashboard In the left pan Search for the Setting option and Click it.
Now select General.
Setting -> General
After clicking General, you see the General Setting page shown in the picture.
Now move down to the section Time Format and Date Format
Changing the Timezone
Time zone is mainly used to represent the local time of a region on the website.
So set the timezone according to the local time of your website or blog in the section Timezone click the Drop-down menu.
You have two options choose timezone by name or code.
Changing Date Format
You can select your Date format in the Date Format section
There are default options you can see in the picture, you can choose anyone.
If you don’t find any format that suits your WordPress theme design, you can create a custom format.
If you want to create your own custom WordPress Date Format, select the radio button Custom.
Now you can see in the picture we have selected the Custom radio button. We have added a custom format F j : Y.
which displays a Preview: October 10 : 2023, we have added a “:” to make a custom format.
You can make it according to your needs.
In the next picture, you can see, we have added Day of the week, by adding “l”
In the preview format is: Preview: Tuesday, October 10 : 2023
You can see both these formats are not present in default WordPress date formats.
List of a Date Formatting Alphabet.
We will list a few formats you can use to design date view. You can fill these alphabet options in the input box of custom date format to customize WordPress date format
Date digit format Alphabet.
S | The English suffix for the day of the month | Example: 1st, 2nd or 10th, nd or th, st . |
d | Numeric, with leading zeros | Example: 01–31 |
j | Numeric, without leading zeros | Example: 1–31 |
Month Format Alphabet
F | Textual full | Example: January – December |
M | Textual three letters | Example: Jan – Dec |
n | Numeric, without leading zeros | Example: 1–12 |
m | Numeric, with leading zeros | Example: 01–12 |
Year Digit Format Alphabet
y | 2 digits (Numeric) | Example: 99, 03 |
Y | 4 digits (Numeric) | Example: 1999, 2003 |
Weak Day Format Alphabet
D | Three letter of weak day | Example: Mon – Sun |
l | Full day name ( ‘L’ lowercase) | Example: Sunday – Saturday |
WordPress Time Format
In this section, you will learn how to change the time format.
WordPress provides some default opinions for time format. However, you have the option to customize the time format according to your preferences.
You can enter the alphabet in the Custom field of time format section and preview it.
There is a list of alphabet option you can use to format the Time Format
List of Time Formatting Alphabet
A | Uppercase | Example: AM, PM |
a | Lowercase | Example: am, pm |
h | Hour, 12-hour, with leading zeros | Example: 01–12 |
g | Hour, 12-hour, without leading zeros | Example: 1–12 |
H | Hour, 24-hour, with leading zeros | Example: 00-23 |
G | Hour, 24-hour, without leading zeros | Example: 0-23 |
i | Minutes, with leading zeros | Example: 00-59 |
s | Seconds, with leading zeros | Example: 00-59 |
T | Timezone abbreviation | Example: EST, MDT … |
Full Date/Time Format
c | ISO 8601 format | Example: 2004-02-12T15:19:21+00:00 |
r | RFC 2822 format | Example: Thu, 21 Dec 2000 16:01:07 +0200 |
U | Unix Timestamp (seconds since the Unix epoch, January 1, 1970 00:00:00 GMT) | Example: 1455880176 |
For reference you can check Documentation on date and time formatting.
Conclusion
It’s crucial to match the date and time format to your WordPress theme.
In this article, you have learned how to easily customize the date and time format on a WordPress website using the General Settings.