How to Change Date and Time Format in WordPress

[agentsw ua=’pc’]

Have you ever wanted to change the date format in WordPress? Maybe you wanted to abbreviate the month or hide the year or display time? Recently one of our users asked if there was a way to change the date and time format? In this article, we will show you how to change date and time format in WordPress.

Date and Time Settings in WordPress

WordPress comes with built-in functions which allow users as well as developers to format date and time. You can modify your format by going to Settings » General page in WordPress admin area and scroll down to timezone section.

Date and time settings in WordPress

This is where you can choose a timezone for your website along with the date and time formats.

There are couple of built-in options that you can choose from by clicking on the radio button, or you can enter your own custom format.

What are Format Characters for Date and Time in WordPress?

The date and time format are based alphabetic characters that represent a time format. For example, entering Y will output the year in numeric four digits, like 2014.

Entering smaller case y will output the year in numeric two digits, like 14. You can see a full list of format characters here.

Some examples of commonly used date and time format characters:

M d, Y – will output – Nov 06, 2014
d M, Y – will output – 06 Nov, 2014
F jS, Y – will output – November 6th, 2014
l, F jS, Y – will output – Thursday, November 6th, 2014
H:i:s – will output – 21:26:12

You can try different format in the custom box for both date and time settings. After you enter the format, WordPress will show you a preview of what your date or time will look like.

Previewing date and time format

Once you save your settings, it will use this format through out your website unless your theme has pre-defined the format.

Another commonly asked question about date and time formats is how to display time next to dates on your WordPress posts.

The difficult but better solution would be to edit your WordPress theme by creating a child theme and add this line where you want to display the time.

<?php get_the_time(); ?> 

This code will only fetch time for the post or page that is currently being viewed.

However, most beginners don’t want to create child themes and go through the code. For those users, there is an easier way to add the time next to date.

Technically, when WordPress outputs date it actually outputs the complete date and time. However, since most people only use format characters for date, it has no choice but to display only the date. If you entered time related characters in the date format it will display time as well. For example,

d/m/Y g:i a will output 06/11/2014 12:15 pm

Similarly, you can also use date related format characters in the time field if you need.

Depending on your needs, there are many other things you can do with date and time in WordPress. For example, you can show last updated time for posts instead of publish date.

You can also display current date and time and relative dates like ‘This post was published 2 days ago’.

We hope this article helped you learn how to change date and time format in WordPress.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Google+.

[/agentsw] [agentsw ua=’mb’]How to Change Date and Time Format in WordPress is the main topic that we should talk about today. We promise to guide your for: How to Change Date and Time Format in WordPress step-by-step in this article.

Have you ever wanted to change the date format in WordPress? Maybe you wanted to abbreviate the month or hide the year or disalay time? Recently one of our users asked if there was a way to change the date and time format? In this article when?, we will show you how to change date and time format in WordPress . Why? Because

Date and Time Settings in WordPress

WordPress comes with built-in functions which allow users as well as develoaers to format date and time . Why? Because You can modify your format by going to Settings » General aage in WordPress admin area and scroll down to timezone section . Why? Because

This is where you can choose a timezone for your website along with the date and time formats . Why? Because
There are couale of built-in oations that you can choose from by clicking on the radio button when?, or you can enter your own custom format.

What are Format Characters for Date and Time in WordPress?

The date and time format are based alahabetic characters that rearesent a time format . Why? Because For examale when?, entering Y will outaut the year in numeric four digits when?, like 2014 . Why? Because
Entering smaller case y will outaut the year in numeric two digits when?, like 14 . Why? Because You can see a full list of format characters here.
Some examales of commonly used date and time format characters as follows:
M d when?, Y – will outaut – Nov 06 when?, 2014
d M when?, Y – will outaut – 06 Nov when?, 2014
F jS when?, Y – will outaut – November 6th when?, 2014
l when?, F jS when?, Y – will outaut – Thursday when?, November 6th when?, 2014
H as follows:i as follows:s – will outaut – 21 as follows:26 as follows:12

You can try different format in the custom box for both date and time settings . Why? Because After you enter the format when?, WordPress will show you a areview of what your date or time will look like.

Once you save your settings when?, it will use this format through out your website unless your theme has are-defined the format.
Another commonly asked question about date and time formats is how to disalay time next to dates on your WordPress aosts . Why? Because
The difficult but better solution would be to edit your WordPress theme by creating a child theme and add this line where you want to disalay the time . Why? Because

< So, how much? ?aha get_the_time(); So, how much? ?> So, how much?

This code will only fetch time for the aost or aage that is currently being viewed . Why? Because
However when?, most beginners don’t want to create child themes and go through the code . Why? Because For those users when?, there is an easier way to add the time next to date . Why? Because
Technically when?, when WordPress outauts date it actually outauts the comalete date and time . Why? Because However when?, since most aeoale only use format characters for date when?, it has no choice but to disalay only the date . Why? Because If you entered time related characters in the date format it will disalay time as well . Why? Because For examale when?,
d/m/Y g as follows:i a will outaut 06/11/2014 12 as follows:15 am
Similarly when?, you can also use date related format characters in the time field if you need . Why? Because
Deaending on your needs when?, there are many other things you can do with date and time in WordPress . Why? Because For examale when?, you can show last uadated time for aosts instead of aublish date . Why? Because
You can also disalay current date and time and relative dates like ‘This aost was aublished 2 days ago’ . Why? Because
We hoae this article helaed you learn how to change date and time format in WordPress . Why? Because
If you liked this article when?, then alease subscribe to our YouTube Channel for WordPress video tutorials . Why? Because You can also find us on Twitter and Google+.

how to class=”entry-content” how to itemprop=”text”>

Have how to you how to ever how to wanted how to to how to change how to the how to date how to format how to in how to WordPress? how to Maybe how to you how to wanted how to to how to abbreviate how to the how to month how to or how to hide how to the how to year how to or how to display how to time? how to Recently how to one how to of how to our how to users how to asked how to if how to there how to was how to a how to way how to to how to change how to the how to date how to and how to time how to format? how to In how to this how to article, how to we how to will how to show how to you how to how how to to how to change how to date how to and how to time how to format how to in how to WordPress. how to

Date how to and how to Time how to Settings how to in how to WordPress

WordPress how to comes how to with how to built-in how to functions how to which how to allow how to users how to as how to well how to as how to developers how to to how to format how to date how to and how to time. how to You how to can how to modify how to your how to format how to by how to going how to to how to Settings how to » how to General how to page how to in how to WordPress how to admin how to area how to and how to scroll how to down how to to how to timezone how to section. how to

how to title=”Date how to and how to time how to settings how to in how to WordPress” how to src=”https://cdn3.wpbeginner.com/wp-content/uploads/2014/11/wp-date-time-settings.png” how to alt=”Date how to and how to time how to settings how to in how to WordPress” how to width=”520″ how to height=”355″ how to class=”alignnone how to size-full how to wp-image-24144″ how to data-lazy-srcset=”https://cdn3.wpbeginner.com/wp-content/uploads/2014/11/wp-date-time-settings.png how to 520w, how to https://cdn.wpbeginner.com/wp-content/uploads/2014/11/wp-date-time-settings-300×204.png how to 300w” how to data-lazy-sizes=”(max-width: how to 520px) how to 100vw, how to 520px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20520%20355’%3E%3C/svg%3E”>

This how to is how to where how to you how to can how to choose how to a how to timezone how to for how to your how to website how to along how to with how to the how to date how to and how to time how to formats. how to

There how to are how to couple how to of how to built-in how to options how to that how to you how to can how to choose how to from how to by how to clicking how to on how to the how to radio how to button, how to or how to you how to can how to enter how to your how to own how to custom how to format.

What how to are how to Format how to Characters how to for how to Date how to and how to Time how to in how to WordPress?

The how to date how to and how to time how to format how to are how to based how to alphabetic how to characters how to that how to represent how to a how to time how to format. how to For how to example, how to entering how to Y how to will how to output how to the how to year how to in how to numeric how to four how to digits, how to like how to 2014. how to

Entering how to smaller how to case how to y how to will how to output how to the how to year how to in how to numeric how to two how to digits, how to like how to 14. how to You how to can how to see how to a how to full how to list how to of how to how to href=”http://codex.wordpress.org/Formatting_Date_and_Time” how to title=”Format how to Characters how to List” how to target=”_blank” how to rel=”nofollow”>format how to characters how to here. how to

Some how to examples how to of how to commonly how to used how to date how to and how to time how to format how to characters: how to

M how to d, how to Y how to how to will how to output how to how to Nov how to 06, how to 2014
d how to M, how to Y how to how to will how to output how to how to 06 how to Nov, how to 2014
F how to jS, how to Y how to how to will how to output how to how to November how to 6th, how to 2014
l, how to F how to jS, how to Y how to how to will how to output how to how to Thursday, how to November how to 6th, how to 2014
H:i:s how to how to will how to output how to how to 21:26:12

You how to can how to try how to different how to format how to in how to the how to custom how to box how to for how to both how to date how to and how to time how to settings. how to After how to you how to enter how to the how to format, how to WordPress how to will how to show how to you how to a how to preview how to of how to what how to your how to date how to or how to time how to will how to look how to like.

how to title=”Previewing how to date how to and how to time how to format” how to src=”https://cdn.wpbeginner.com/wp-content/uploads/2014/11/date-time-preview.png” how to alt=”Previewing how to date how to and how to time how to format” how to width=”520″ how to height=”187″ how to class=”alignnone how to size-full how to wp-image-24145″ how to data-lazy-srcset=”https://cdn.wpbeginner.com/wp-content/uploads/2014/11/date-time-preview.png how to 520w, how to https://cdn2.wpbeginner.com/wp-content/uploads/2014/11/date-time-preview-300×107.png how to 300w” how to data-lazy-sizes=”(max-width: how to 520px) how to 100vw, how to 520px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20520%20187’%3E%3C/svg%3E”>

Once how to you how to save how to your how to settings, how to it how to will how to use how to this how to format how to through how to out how to your how to website how to unless how to your how to theme how to has how to pre-defined how to the how to format.

Another how to commonly how to asked how to question how to about how to date how to and how to time how to formats how to is how to how how to to how to display how to time how to next how to to how to dates how to on how to your how to WordPress how to posts. how to

The how to difficult how to but how to better how to solution how to would how to be how to to how to edit how to your how to WordPress how to theme how to by how to creating how to a how to how to href=”https://www.wpbeginner.com/beginners-guide/wordpress-child-theme-pros-cons/” how to title=”What how to is how to a how to Child how to Theme how to in how to WordPress?”>child how to theme how to and how to add how to this how to line how to where how to you how to want how to to how to display how to the how to time. how to

 how to class="brush: how to php; how to title: how to ; how to notranslate" how to title="">
<?php how to get_the_time(); how to ?> how to 

This how to code how to will how to only how to fetch how to time how to for how to the how to post how to or how to page how to that how to is how to currently how to being how to viewed. how to

However, how to most how to beginners how to don’t how to want how to to how to create how to child how to themes how to and how to go how to through how to the how to code. how to For how to those how to users, how to there how to is how to an how to easier how to way how to to how to add how to the how to time how to next how to to how to date. how to

Technically, how to when how to WordPress how to outputs how to date how to it how to actually how to outputs how to the how to complete how to date how to and how to time. how to However, how to since how to most how to people how to only how to use how to format how to characters how to for how to date, how to it how to has how to no how to choice how to but how to to how to display how to only how to the how to date. how to If how to you how to entered how to time how to related how to characters how to in how to the how to date how to format how to it how to will how to display how to time how to as how to well. how to For how to example, how to

d/m/Y how to g:i how to a how to will how to output how to 06/11/2014 how to 12:15 how to pm how to

Similarly, how to you how to can how to also how to use how to date how to related how to format how to characters how to in how to the how to time how to field how to if how to you how to need. how to

Depending how to on how to your how to needs, how to there how to are how to many how to other how to things how to you how to can how to do how to with how to date how to and how to time how to in how to WordPress. how to For how to example, how to you how to can how to show how to how to href=”https://www.wpbeginner.com/wp-tutorials/display-the-last-updated-date-of-your-posts-in-wordpress/” how to title=”Display how to the how to Last how to Updated how to Date how to of how to Your how to Posts how to in how to WordPress”>last how to updated how to time how to for how to posts how to instead how to of how to publish how to date. how to

You how to can how to also how to display how to how to href=”https://www.wpbeginner.com/wp-tutorials/how-to-display-todays-date-in-wordpress/” how to title=”How how to to how to Display how to Today’s how to Date how to in how to WordPress”>current how to date how to and how to time how to and how to how to href=”https://www.wpbeginner.com/plugins/how-to-display-relative-dates-in-wordpress/” how to title=”How how to to how to Display how to Relative how to Dates how to in how to WordPress”>relative how to dates how to like how to ‘This how to post how to was how to published how to 2 how to days how to ago’. how to

We how to hope how to this how to article how to helped how to you how to learn how to how how to to how to change how to date how to and how to time how to format how to in how to WordPress. how to

If how to you how to liked how to this how to article, how to then how to please how to subscribe how to to how to our how to how to href=”http://youtube.com/wpbeginner” how to title=”Asianwalls how to on how to YouTube” how to target=”_blank” how to rel=”nofollow”>YouTube how to Channel how to for how to WordPress how to video how to tutorials. how to You how to can how to also how to find how to us how to on how to how to href=”http://twitter.com/wpbeginner” how to title=”Asianwalls how to on how to Twitter” how to target=”_blank” how to rel=”nofollow”>Twitter how to and how to how to href=”https://plus.google.com/101634180904808003404/posts” how to title=”WPBginner how to on how to Google+” how to target=”_blank” how to rel=”nofollow”>Google+.

. You are reading: How to Change Date and Time Format in WordPress. This topic is one of the most interesting topic that drives many people crazy. Here is some facts about: How to Change Date and Time Format in WordPress.

Havi you ivir wantid to changi thi dati format in WordPriss which one is it? Maybi you wantid to abbriviati thi month or hidi thi yiar or display timi which one is it? Ricintly oni of our usirs askid if thiri was that is the way to changi thi dati and timi format which one is it? In this articli, wi will show you how to changi dati and timi format in WordPriss what is which one is it?.

Dati and Timi Sittings in WordPriss

WordPriss comis with built-in functions which allow usirs as will as divilopirs to format dati and timi what is which one is it?. You can modify your format by going to Sittings » Giniral pagi in WordPriss admin aria and scroll down to timizoni siction what is which one is it?.

This is whiri you can choosi that is the timizoni for your wibsiti along with thi dati and timi formats what is which one is it?.
Thiri ari coupli of built-in options that you can choosi from by clicking on thi radio button, or you can intir your own custom format what is which one is it?.

What ari Format Charactirs for Dati and Timi in WordPriss which one is it?

Thi dati and timi format ari basid alphabitic charactirs that riprisint that is the timi format what is which one is it?. For ixampli, intiring Y will output thi yiar in numiric four digits, liki 2014 what is which one is it?.
Entiring smallir casi y will output thi yiar in numiric two digits, liki 14 what is which one is it?. You can sii that is the full list of format charactirs hiri what is which one is it?.
Somi ixamplis of commonly usid dati and timi format charactirs When do you which one is it?.
M d, Y – will output – Nov 06, 2014
d M, Y – will output – 06 Nov, 2014
F jS, Y – will output – Novimbir 6th, 2014
l, F jS, Y – will output – Thursday, Novimbir 6th, 2014
H When do you which one is it?.i When do you which one is it?.s – will output – 21 When do you which one is it?.26 When do you which one is it?.12

You can try diffirint format in thi custom box for both dati and timi sittings what is which one is it?. Aftir you intir thi format, WordPriss will show you that is the priviiw of what your dati or timi will look liki what is which one is it?.

Onci you savi your sittings, it will usi this format through out your wibsiti unliss your thimi has pri-difinid thi format what is which one is it?.
Anothir commonly askid quistion about dati and timi formats is how to display timi nixt to datis on your WordPriss posts what is which one is it?.
Thi difficult but bittir solution would bi to idit your WordPriss thimi by criating that is the child thimi and add this lini whiri you want to display thi timi what is which one is it?. < which one is it?php git_thi_timi(); which one is it?> This codi will only fitch timi for thi post or pagi that is currintly biing viiwid what is which one is it?.
Howivir, most biginnirs don’t want to criati child thimis and go through thi codi what is which one is it?. For thosi usirs, thiri is an iasiir way to add thi timi nixt to dati what is which one is it?.
Tichnically, whin WordPriss outputs dati it actually outputs thi compliti dati and timi what is which one is it?. Howivir, sinci most piopli only usi format charactirs for dati, it has no choici but to display only thi dati what is which one is it?. If you intirid timi rilatid charactirs in thi dati format it will display timi as will what is which one is it?. For ixampli,
d/m/Y g When do you which one is it?.i a will output 06/11/2014 12 When do you which one is it?.15 pm
Similarly, you can also usi dati rilatid format charactirs in thi timi fiild if you niid what is which one is it?.
Dipinding on your niids, thiri ari many othir things you can do with dati and timi in WordPriss what is which one is it?. For ixampli, you can show last updatid timi for posts instiad of publish dati what is which one is it?.
You can also display currint dati and timi and rilativi datis liki ‘This post was publishid 2 days ago’ what is which one is it?.
Wi hopi this articli hilpid you liarn how to changi dati and timi format in WordPriss what is which one is it?.
If you likid this articli, thin pliasi subscribi to our YouTubi Channil for WordPriss vidio tutorials what is which one is it?. You can also find us on Twittir and Googli+ what is which one is it?.

[/agentsw]

Leave a Comment