Title: Post date inverted
Last modified: October 28, 2020

---

# Post date inverted

 *  Resolved [bondweb](https://wordpress.org/support/users/bondweb/)
 * (@bondweb)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/post-date-inverted/)
 * Hi I’m having a problem with the posts date format after importation
 * I don’t undestand why if in xml file the posts date are in september 2020 like
 * <pubDate>20/09/2020</pubDate>
 * wp set post date with the current date 28/10/2020
 * as well if is <pubDate>02/05/2020</pubDate>
 * wp invert the post date in 05/02/2020
 * So my issue is that in the same importation some posts date are inverted and 
   some are changend with the current date
 * Thanks for support me 🙂 Guys

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

 *  Plugin Author [WP All Import](https://wordpress.org/support/users/wpallimport/)
 * (@wpallimport)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/post-date-inverted/#post-13593510)
 * Hi [@bondweb](https://wordpress.org/support/users/bondweb/),
 * The problem is that PHP interprets dates as “month/day/year” when slashes are
   used in the date. So, you can fix this by changing each “/” to “.”, e.g. “20.09.2020”.
 * If you can’t change the dates in the file, you can easily fix it with a PHP function:
   [https://www.wpallimport.com/documentation/developers/custom-code/inline-php/](https://www.wpallimport.com/documentation/developers/custom-code/inline-php/).
   Example:
 * `[str_replace("/",".",{pubDate[1]})]`
 *  Plugin Author [WP All Import](https://wordpress.org/support/users/wpallimport/)
 * (@wpallimport)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/post-date-inverted/#post-13617882)
 * Hey [@bondweb](https://wordpress.org/support/users/bondweb/),
 * I’m going to mark this as resolved since we haven’t heard back. If you still 
   have questions, please let us know.
 * Anyone else with questions, please start a new topic.

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

The topic ‘Post date inverted’ is closed to new replies.

 * ![](https://ps.w.org/wp-all-import/assets/icon-256x256.png?rev=2570179)
 * [WP All Import – Drag & Drop Import for CSV, XML, Excel & Google Sheets](https://wordpress.org/plugins/wp-all-import/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-all-import/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-all-import/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-all-import/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-all-import/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-all-import/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [WP All Import](https://wordpress.org/support/users/wpallimport/)
 * Last activity: [5 years, 9 months ago](https://wordpress.org/support/topic/post-date-inverted/#post-13617882)
 * Status: resolved