Learn how to Shortly Change the Date and Time Format in WordPress » Rank Math

Have you ever ever needed to vary your WordPress web site’s date and time format?
There are numerous methods to precise date and time. A date and time format that works for one may not essentially work for the opposite. It’s possible you’ll favor writing the month after which the date, or vice versa. Maybe you’re a fan of abbreviated months or favor expressing the months as numbers.
The identical goes for time. Some favor to make the most of 12-hour clocks, whereas others solely use 24-hour time. Nonetheless, understanding easy methods to format the date and time is useful. It offers you the liberty to make a date extra readable for customers.
For instance, “On Monday the 4th of Apr, 2023” is extra readable than minimal date shows like “04.04.2023”. Nonetheless, the latter does have its place. The identical goes for formatting the present time on an internet site. Some websites could profit from a 12hr show like “9:30 pm” whereas others (like army or medical websites) would quite have a 24hr show like “21:30”.
No matter your most popular format is, you’ll be delighted to listen to that it’s potential (and really straightforward) to vary the date and time format out of your WordPress dashboard.
1 Change the Date and Time Settings in WordPress
WordPress has built-in features permitting customers and builders to format dates and occasions. You possibly can change the date and time format by navigating to Settings > Common web page out of your WordPress dashboard.
Scroll down to search out Timezone, Date Format & Time Format sections. You possibly can then change the date and time format as per your preferences. Let’s take a look at every of the sections intimately.

1.1 Timezone
You can begin by typing within the metropolis’s title after which selecting from the ends in the dropdown menu.

Alternatively, you’ll be able to set the UTC time zone, as proven under.

1.2 Date Format
You’ll discover the Date Format settings just under the Timezone settings. You possibly can choose the date format per your desire and even set a customized date.

To set a customized date, click on the Customized radio button and enter the format you want to set. For example, we set a customized date as proven under.

Verify the preview to make sure you selected the right format. In case you use punctuation marks like commas or dashes, be aware that they’ll be used all over the place.

1.3 Time Format
Subsequent, you’ll be able to set the time format situated slightly below the date format settings.

Once more, you’ll be able to select from one of many current choices or click on on the Customized choice to outline your personal. You possibly can preview the chosen format under.

You can too set the beginning day of the week by deciding on the day from the drop-down menu, as proven under.

When you’ve made adjustments, click on on the Save Modifications button. And that’s how one can shortly change the date and time format in your WordPress web site.
2 WordPress Time and Date Codecs
There’s a string of characters referred to as the format string subsequent to every choice for Date Format and Time Format on the Settings’ Common web page.

These format characters signify completely different components of the date and time construction. Right here is an illustration of what every character within the m/d/Y format string denotes:
- m – the numeric month with a number one zero.
- d – the numeric day of the month with a number one zero.
- Y – the four-digit yr.
Due to this fact, this string will output:
04/10/2023
You can too create your personal customized construction string utilizing the next date and time format characters.
Sample |
Show | Instance |
Month | ||
F | The month’s full title | January – December |
M | The month’s three-letter abbreviation | Jan – Dec |
m | The numeric month with main zeros | 01 – 12 |
n | The numeric month with out main zeros | 1 – 12 |
Day of the month | ||
d | The numeric day of the month with main zeros | 01 – 31 |
j | The numeric day of the month with out main zeros | 1 – 31 |
S | The English suffix for the numeric day of the month | st (in 1st), nd (in 2nd) |
Day of the week | ||
l (lower-case letter L) | The day of the week’s full title | Monday – Sunday |
D | The day of the week’s three-letter abbreviation | Mon – Solar |
Yr | ||
Y | The four-digit yr | 2023 |
y | The 2-digit yr | 22 |
Time | ||
a | Lowercase am or pm | am, pm |
A | Uppercase AM or PM | AM, PM |
g | The hour in a 12-hour format with out main zeros | 1 – 12 |
h | The hour in a 12-hour format with main zeros | 01 – 12 |
G | The hour in a 24-hour format with out main zeros | 0 – 23 |
H | The hour in a 24-hour format with main zeros | 0 – 23 |
i | Minutes with main zeros | 00 – 59 |
s | Seconds with main zeros | 00 – 59 |
T | The timezone abbreviation | PST, EDT |
Full date and time | ||
c | ISO 8601 format | 2022-10-29T18:56:24+00:00 |
r | RFC 2822 format | Mon, 04 April 2023 18:56:24+0200 |
U | Unix Timestamp (seconds for the reason that Unix epoch, January 1, 1970 00:00:00 GMT) | 1661842310 |
3 Examples of Time and Date Format Strings
Some examples of generally used date and time format characters are as follows:
M d, Y
– will output – Apr 04, 2023d M, Y
– will output – 04 Apr, 2023F jS, Y
– will output – April 4th, 2023l, F jS, Y
– will output – Monday, April 4th, 2023H:i:s
– will output – 21:24:12F j, Y g: i a
– will output – April 4, 2023 10:45 am
4 Conclusion
As you’ve seen, you’ll be able to simply change the date and time codecs based mostly in your desire. It takes a couple of easy steps in your WordPress dashboard, and the most effective half is you’ll be able to all the time change the date and time and even create customized codecs. Not solely this, however WordPress additionally means that you can change the date and time of your posts/pages.
The Date and Time format could differ within the completely different time zones, so guarantee you’ve gotten correct data about these zones earlier than you get your fingers soiled in customizing date and time zones in WordPress.
What are you ready for? Get began, change the date and time to make your web site extra enticing and stylish, or use customized date and time codecs. In case you like this put up, tell us by Tweeting @rankmathseo.