Title: [Plugin: Get Posts]  date format issue
Last modified: August 19, 2016

---

# [Plugin: Get Posts] date format issue

 *  Resolved [hugobs](https://wordpress.org/support/users/hugobs/)
 * (@hugobs)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/get-posts-plugin-date-format-issue/)
 * hi,
    i am using Nurelm get posts plugin. i have a problem with my date format:
 * [get_posts tag=”eu” tag=”press-release” numberposts=100 fields=”post_title, post_date”
   orderby=”date”]
 * returns me a list of posts that look like:
 * – Release of EU report2010-05-19 13:20:34
 * whereas i would like them to look like:
 * – Release of EU report, 19 May 2010
 * what do i have to change?
    thanks a lot!

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

 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/get-posts-plugin-date-format-issue/#post-1506856)
 * Probably need to change the date ‘format’ the plugin uses with [the_time()](http://codex.wordpress.org/Template_Tags/the_time)(
   or [the_date()](http://codex.wordpress.org/Template_Tags/the_date)).
 * If you can’t figure it out, leave a link to the plugin so I can tag this thread
   so the plugin author might be able to find it.
 *  Thread Starter [hugobs](https://wordpress.org/support/users/hugobs/)
 * (@hugobs)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/get-posts-plugin-date-format-issue/#post-1506899)
 * hi, thanks for the reply. i still cant make this work :(.
 * below is the .php of the plugin, which can be found here: [http://wordpress.org/extend/plugins/nurelm-get-posts/](http://wordpress.org/extend/plugins/nurelm-get-posts/)
 * thanks a lot
 *  [code moderated use a pastebin such as wordpress.pastebin.com in the future,
   please]
 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/get-posts-plugin-date-format-issue/#post-1506918)
 * From the comments listed under that Plugin’s Homepage WuLongTi has a fix to format
   the date:
 * >  if you change this code:
   > $field = trim($field);
   >  $content = $content . $post->$field;
   > to this code:
   > if (trim($fields_list[$i])==’post_date’){
   >  $field = trim($field); $dateFormat
   > = ‘l F j, Y’; $content .= mysql2date($dateFormat, $post->$field); }else{ $field
   > = trim($field); $content = $content . $post->$field; }
   > then you can reformat the date however you like.
 *  Thread Starter [hugobs](https://wordpress.org/support/users/hugobs/)
 * (@hugobs)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/get-posts-plugin-date-format-issue/#post-1507001)
 * it works! now, i just need to solve a small detail:
    i would like to have a comma
   and a space between the title and the date, i.e.: Release of EU report, May 19,
   2010 instead of Release of EU reportMay 19, 2010 any clue on how to do this? 
   many thanks!
 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/get-posts-plugin-date-format-issue/#post-1507038)
 * You could probably do that in your date format
    something like:
 *     ```
       ', l F j, Y'
       ```
   
 * note the beginning comma and space (work that into whatever format you used)
 *  Thread Starter [hugobs](https://wordpress.org/support/users/hugobs/)
 * (@hugobs)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/get-posts-plugin-date-format-issue/#post-1507091)
 * that worked, thanks a million.

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

The topic ‘[Plugin: Get Posts] date format issue’ is closed to new replies.

## Tags

 * [date format](https://wordpress.org/support/topic-tag/date-format/)
 * [get_posts](https://wordpress.org/support/topic-tag/get_posts/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 2 participants
 * Last reply from: [hugobs](https://wordpress.org/support/users/hugobs/)
 * Last activity: [15 years, 10 months ago](https://wordpress.org/support/topic/get-posts-plugin-date-format-issue/#post-1507091)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
