Disclosure: This post may contain affiliate links. Purchasing a product through one of these links generates a commission for us at no additional expense to you.
Need to change the date format used on your site?
WordPress has a simple option for this built into the dashboard, so you don’t need to install any new plugins.
In this post, you’ll learn how to change the format and create your own custom date formats.
How to Change the Date Format
If you prefer a video, you can follow along with my tutorial here:
Subscribe to Compete Themes on Youtube
To change the format, visit the General Settings page in your dashboard. There you’ll see the Date Format setting.
There are a few existing formats you can choose from. Select a new format, and save your changes to update the date format across your site.
The new format will be used across the site in places like the post byline and in comments if your theme includes comment dates.
If you don’t see a format you want to use, you can also create your own.
How to Create a Custom Date Format
The first step is to visit the date & time formatting documentation on wordpress.org. There you’ll find a table outlining the characters you can use to create your own format.
For instance, lets imagine a site that publishes once a month. Since there’s only one post per month, there’s no need to display the exact day it was published. This means you could use a format like April 2016.
To do this, you would find the month name character in the WordPress documentation (F), and follow it with a space and the character for the year (Y).
Once you know the characters, enter them into the Custom format box and save your new settings.
The dates will update instantly across your site.
How to Add a Timestamp
Most WordPress users don’t realize they can use timestamp characters in their date format. Take these date formats, for example:
April 2, 2016 – F j, Y
8:23 am – g:i a
The first one is an example of a date format, and the second is a timestamp.
You can combine these characters to create a date format that includes a timestamp like this:
April 2, 2016, 8:23 am – F j, Y, g:i a
Using the characters, F j, Y, g:i a, the dates across the site can be updated to display both the date and timestamp of publication.
Some themes may not support the use of dates and timestamps in conjunction, but all formats are supported by our free WordPress themes.
Conclusion
Changing the date format used across your site is simple with WordPress.
If one of the pre-existing formats fits your needs well, you can quickly select it and be on your way. Creating your own date formats adds a lot more flexibility for customizing how dates are displayed on your site.