Title: pubdate formatting&#8230;
Last modified: August 19, 2016

---

# pubdate formatting…

 *  Resolved [davve00](https://wordpress.org/support/users/davve00/)
 * (@davve00)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/pubdate-formatting/)
 * When I print the pubdate variable using
 * `echo '<li><a href="'.$item['link'].'">'.$item['title'].'</a> - '.$item['pubdate'].'
   </li>';`
 * I get the output
 * `bla bla bla - Sat, 17 May 2008 14:37:02 +0000`
 * How can I get the formatting to look like
 * `bla bla bla - 17 May`
 * davve

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

 *  [haochi](https://wordpress.org/support/users/haochi/)
 * (@haochi)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/pubdate-formatting/#post-767751)
 * Is that in the feeds? Don’t bother to change it because [it HAS to be in that format](http://cyber.law.harvard.edu/rss/rss.html#optionalChannelElements).
 *  Thread Starter [davve00](https://wordpress.org/support/users/davve00/)
 * (@davve00)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/pubdate-formatting/#post-767785)
 * yes, the rss, sorry. but is there no way I print only “17 may” and not the whole
   string???
 *  [haochi](https://wordpress.org/support/users/haochi/)
 * (@haochi)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/pubdate-formatting/#post-767791)
 *     ```
       echo '<li><a href="'.$item['link'].'">'.$item['title'].'</a> - '.date("j M", strtotime($item['pubdate'])).'</li>';
       ```
   
 * See: [here](http://php.net/manual/en/function.strtotime.php#82907) if the date
   is not showing and [here](http://www.php.net/manual/en/function.date.php) to 
   find out how to format the dates.
 *  Thread Starter [davve00](https://wordpress.org/support/users/davve00/)
 * (@davve00)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/pubdate-formatting/#post-767794)
 * Thanks!

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

The topic ‘pubdate formatting…’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [davve00](https://wordpress.org/support/users/davve00/)
 * Last activity: [18 years, 1 month ago](https://wordpress.org/support/topic/pubdate-formatting/#post-767794)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
