Title: PHP Date Help
Last modified: August 19, 2016

---

# PHP Date Help

 *  [alltrue](https://wordpress.org/support/users/alltrue/)
 * (@alltrue)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/php-date-help/)
 * I want to change the way my date is presented. How do I change it to read example“
   March 24, 2008”
 * <div class=”date-meta”><span class=”date-day”><?php the_time(‘j’) ?><span class
   =”date-tense”><?php the_time(‘S’) ?></span></span><span class=”date-month-year”
   ><?php the_time(‘M. × ’y’) ?></span></div>
 * website is [http://www.randomgoodness.ca](http://www.randomgoodness.ca)
 * thanks

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Moderator [Kathryn Presner](https://wordpress.org/support/users/zoonini/)
 * (@zoonini)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/php-date-help/#post-1916074)
 * Replace
 * `<?php the_time('M. × ’y') ?>`
 * with
 * `<?php the_time('F j, Y'); ?>`
 * Reference: [http://codex.wordpress.org/Function_Reference/the_time#Date_as_Month_Day.2C_Year](http://codex.wordpress.org/Function_Reference/the_time#Date_as_Month_Day.2C_Year)
 * Be sure your Site Settings are also set to:
 * Settings > General > Date Format
 * Choose the first option: February xx, 2011
 *  Thread Starter [alltrue](https://wordpress.org/support/users/alltrue/)
 * (@alltrue)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/php-date-help/#post-1916100)
 * hi Zoonini,
    Still no luck with the php, I changed the Settings as you mentioned.
   Also noticed that maybe I’m looking in the wrong place…as it says php “time” 
   not “date”. It looks like the theme may be a little complicated as the php has
   a lot of spans,& classes (see my first post). What do you think.
 * Josh
 *  Moderator [Kathryn Presner](https://wordpress.org/support/users/zoonini/)
 * (@zoonini)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/php-date-help/#post-1916104)
 * Did you edit the PHP code also and upload the file?
 * the_time() has date functionality built in – did you check out the reference?
   [http://codex.wordpress.org/Function_Reference/the_time#Date_as_Month_Day.2C_Year](http://codex.wordpress.org/Function_Reference/the_time#Date_as_Month_Day.2C_Year)
 * You can also use `<?php the_date(); ?>` if you prefer.
 * [http://codex.wordpress.org/Template_Tags/the_date#Default_Usage](http://codex.wordpress.org/Template_Tags/the_date#Default_Usage)
 *  Moderator [Kathryn Presner](https://wordpress.org/support/users/zoonini/)
 * (@zoonini)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/php-date-help/#post-1916108)
 * You are right in that there are a lot of spans in your code. Just realized your
   date is being split up into lots of little chunks that can be styled differently.
 * If you want to really simplify things, you can replace:
 * `<div class="date-meta"><span class="date-day"><?php the_time('j') ?><span class
   ="date-tense"><?php the_time('S') ?></span></span><span class="date-month-year"
   ><?php the_time('M. × ’y') ?></span></div>`
 * with
 *     ```
       <div class="date-meta"><?php the_date(); ?></div>
       ```
   
 *  Thread Starter [alltrue](https://wordpress.org/support/users/alltrue/)
 * (@alltrue)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/php-date-help/#post-1916114)
 * Awesome that simple method worked, thats all I wanted. Now I just need to figure
   out how to control it using css. lol.
 * Josh
 *  Moderator [Kathryn Presner](https://wordpress.org/support/users/zoonini/)
 * (@zoonini)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/php-date-help/#post-1916117)
 * Just add a .date-meta class to your CSS and start playing. 🙂
 * If you would please mark this thread as “resolved” it would be appreciated. Helps
   everyone keep better track of whose issues are still outstanding. Thanks!
 *  Thread Starter [alltrue](https://wordpress.org/support/users/alltrue/)
 * (@alltrue)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/php-date-help/#post-1916119)
 * that worked to fix the main page date, but didn’t change the date once you click
   on an indivual post to comment.
 *  Moderator [Kathryn Presner](https://wordpress.org/support/users/zoonini/)
 * (@zoonini)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/php-date-help/#post-1916127)
 * Then you’ll need to make the same date change in single.php or loop.php or wherever
   the date is coming from.
 *  Thread Starter [alltrue](https://wordpress.org/support/users/alltrue/)
 * (@alltrue)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/php-date-help/#post-1916255)
 * Perfect, took a little work but I found it in the functions section.
    Thanks 
   Zoonini.
 *  Moderator [Kathryn Presner](https://wordpress.org/support/users/zoonini/)
 * (@zoonini)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/php-date-help/#post-1916257)
 * Excellent. Please don’t forget to mark this thread as resolved – thank you!

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘PHP Date Help’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 10 replies
 * 2 participants
 * Last reply from: [Kathryn Presner](https://wordpress.org/support/users/zoonini/)
 * Last activity: [15 years, 2 months ago](https://wordpress.org/support/topic/php-date-help/#post-1916257)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
