For quite sometime, the post date format has not bee what I wanted. It was displaying day-month-year ( 21-1-10). This was confusing some of my readers. I tried to change it in the WordPress dashboard under Settings, but it never made a difference. I searched for a solution and found several people had the same problem but no one actually had a good answer. However, one of the posts refered me to Customizing the Time and Date and while this was just the formatting of the date and time, it did give me a clue of what to look for.
WordPress is written in the programming language PHP. The date formatting functions in WordPress use PHP’s built-in date formatting functions. You can use the table of date format characters on the PHP website as a reference for building date format strings for use in WordPress.
Armed with this information, I went to my WordPress dashboard and clicked on Appearance and then Editor. Then I started going through the Template Theme files. Sure enough, I found <?php the_time(‘D m-d-Y’) in the Main Index Template (index.php) file. So I went back to the Format page to see what options I had and decided on the day, month-date-year for my format. So I changed <?php the_time(‘D m-d-Y’) to <?php the_time(‘D, m-d-Y’) and then clicked on update. And as you can see, the dates of my posts, on the main page, now have the post date formatted the way I wanted.
The other place you can change the time and date format is in Single Post (single.php) which I did a little different that my main page. I decided to go with l, F jS, Y which will look like: Friday, January 22nd, 2010
UPDATE: I found a couple other places that needed to be changed in my theme. So here is a list of the files that I could change my date format in.
Archives (archive.php)
Comments (comment.php)
Main Index Template (index.php)
Single Post (single.php)
Hope this helps. If you have any questions, leave me a comment and I will try to help.



157 Comments
Only american arrogant ignorants confuse this date format…the rest of the World uses D-M-Y, as with metres for distance, kilos for weight, comma for decimals, dots for thousands, football for your soccer etc.Open up your eyes and align with the rest of the world.
Ha. Well I guess I am what you say because I’m going to do it the way I like.
Alas, this is not working for me. I’m trying to remove the S from the date format, which adds “st” or “rd” to the numbers in dates. I can see it and delete it, but when I click Update, the S returns to the code. This happens in all the .php files I’ve tried to edit. I’d be most grateful for any ideas.
nice website graphics. just the heading could require some updates
or is this a downloaded css?
well i should stop to chat, just wanted to let you know.
Too many compliments too little space, thnkas!
Great article, thank you very much!
Nombre de http://www.pccybertek.com a GoogleReader!
Dougles
Took me time to read all the comments, but I really enjoyed the article. It proved to be Very helpful to me and I am sure to all the commenters here! It’s always nice when you can not only be informed, but also entertained! I’m sure you had fun writing this article.
Story, i enjoyed sharing this.
hi
i’m so pleased that i found this website. that posting was so nice. thanks again i bookmarked this page.
are you planning to write similar news?
Resources like the one you mentioned here will be very useful to me! I will post a link to this page on my blog. I am sure my visitors will find that very useful.
I have recently started using the blogengine.net and I having some problems here? in your blog you stated that we need to enable write permissions on the App_Data folder…unfortunately I don’t understand how to enable it.
Mike, this looks like a clever spam comment so I removed your links. If this is a real question, just reply to this and I will try to help and put your links back in
I agree with your Blog and I will be back to check it more in the future so please keep up your work. I love your content & the way that you write. It looks like you’ve been doing this for a while now, how long have you been blogging for?
Just want to say what a great blog you got here!
I’ve been around for quite a lot of time, but finally decided to show my appreciation of your work!
Thumbs up, and keep it going!
Cheers
Christian
Great article Thank
you so much!
good information you
write it very clean. I am very lucky to get this tips from you.
Nice post…Thank you for sharing some good things!!
I hope you will keep updating your content constantly as you have one dedicated reader here.
I’ve taken some time off because I lost my google ads and they were the only thing that was helping me pay for my hosting. With out ads, I probably won’t have enough money to keep my hosting.
This pointed me in the right direction too, but what am I missing here? I’m assuming it’s a copy/paste typo when you suggest to change
“<?php the_time(‘D, m-d-Y’)"
to
"<?php the_time(‘D, m-d-Y’)"
considering that this is the same code. I assume the former call parameter list is supposed to read ('D, d-m-Y') because replacing some code with the exact same code won't actually change anything. Thought you would like to know (as opposed to spam/users 'wholesale shoes', 'registry cleaner', and 'home loan'), I am a real person wanting to write and liking wordpress just working through the various confusions in the themes I'm evaluating.
Barry, thank you very much for pointing this out. I remember when this happened and for some reason I never got around to fixing it and forgot about it.
I’m fixing it now. Thanks again!
Can I just say what a relief to find someone who actually knows what theyre talking about on the internet.
Trackbacks/Pingbacks