This is feature image

How to Change WordPress Date Format: 3 Easy Steps

Published by on October 10, 2023
Categories: BLOG WORDPRESS

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.

SThe English suffix for the day of the monthExample: 1st, 2nd or 10th, nd or th, st .
dNumeric, with leading zerosExample: 01–31
jNumeric, without leading zerosExample: 1–31

Month Format Alphabet

FTextual fullExample: January – December
MTextual three lettersExample: Jan – Dec
nNumeric, without leading zerosExample: 1–12
mNumeric, with leading zerosExample: 01–12

Year Digit Format Alphabet

y 2 digits (Numeric)Example: 99, 03
Y 4 digits (Numeric)Example: 1999, 2003

Weak Day Format Alphabet

DThree letter of weak dayExample: Mon – Sun
lFull 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

AUppercaseExample: AM, PM
aLowercaseExample: am, pm
hHour, 12-hour, with leading zerosExample: 01–12
gHour, 12-hour, without leading zerosExample: 1–12
HHour, 24-hour, with leading zerosExample: 00-23
GHour, 24-hour, without leading zerosExample: 0-23
iMinutes, with leading zerosExample: 00-59
sSeconds, with leading zerosExample: 00-59
TTimezone abbreviationExample: EST, MDT …

Full Date/Time Format

cISO 8601 formatExample: 2004-02-12T15:19:21+00:00
rRFC 2822 formatExample: 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.

Related Posts

Gurjit

Gurjit Singh is a Content Writer and Web developer. He has experience in theme development, front-end development, and digital market. He loves to share his knowledge to help others in creating Websites, WordPress blogs, and SEO.