February 14, 2025

Have you ever ever needed to alter your WordPress website’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. You might desire writing the month after which the date, or vice versa. Maybe you’re a fan of abbreviated months or desire expressing the months as numbers.

The identical goes for time. Some desire to make the most of 12-hour clocks, whereas others solely use 24-hour time. Nonetheless, understanding the best way to format the date and time turns out to be 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 navy or medical websites) would quite have a 24hr show like “21:30”.

No matter your most well-liked format is, you’ll be delighted to listen to that it’s attainable (and really simple) to alter the date and time format out of your WordPress dashboard.

1 Change the Date and Time Settings in WordPress

WordPress has built-in capabilities permitting customers and builders to format dates and instances. You possibly can change the date and time format by navigating to Settings > Normal web page out of your WordPress dashboard.

Scroll down to seek out Timezone, Date Format & Time Format sections. You possibly can then change the date and time format as per your preferences. Let’s have a look at every of the sections intimately.

change the date and time format in WordPress

1.1 Timezone

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

timezone

Alternatively, you possibly can set the UTC time zone, as proven under.

UTC timezone

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 choice and even set a customized date.

date format setttings

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

set custom date

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

preview date

1.3 Time Format

Subsequent, you possibly can set the time format positioned just below the date format settings.

time format settings

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

custom time format

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

week starts on option

When you’ve made modifications, click on on the Save Adjustments button. And that’s how one can rapidly change the date and time format in your WordPress website.

2 WordPress Time and Date Codecs

There’s a string of characters generally known as the format string subsequent to every possibility for Date Format and Time Format on the Settings’ Normal web page.

format string for for date and time format

These format characters signify totally 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:

  • – the numeric month with a number one zero.
  • – the numeric day of the month with a number one zero.
  • – the four-digit 12 months.

Subsequently, 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 identify 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 identify Monday – Sunday
D The day of the week’s three-letter abbreviation Mon – Solar
Yr
Y The four-digit 12 months 2023
y The 2-digit 12 months 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 because the 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, 2023
  • d M, Y – will output – 04 Apr, 2023
  • F jS, Y – will output – April 4th, 2023
  • l, F jS, Y – will output – Monday, April 4th, 2023
  • H:i:s – will output – 21:24:12
  • F j, Y g: i a – will output – April 4, 2023 10:45 am

4 Conclusion

As you’ve seen, you possibly can simply change the date and time codecs based mostly in your choice. It takes just a few easy steps in your WordPress dashboard, and one of the best half is you possibly can at all times change the date and time and even create customized codecs. Not solely this, however WordPress additionally lets you change the date and time of your posts/pages.

The Date and Time format could differ within the totally different time zones, so guarantee you’ve correct information 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 website extra enticing and chic, or use customized date and time codecs. For those who like this publish, tell us by Tweeting @rankmathseo.