Title: Date format when importing
Last modified: December 22, 2017

---

# Date format when importing

 *  Resolved [osipmikhail](https://wordpress.org/support/users/osipmikhail/)
 * (@osipmikhail)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/date-format-when-importing/)
 * For some reason every time I import the data and use the Title & Content section
   to add fields the date keeps switching to American format.
 * Is there anyway of changing this? All language settings have been set to English
   UK so I know it has no relation to that.

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

 *  Plugin Author [WP All Import](https://wordpress.org/support/users/wpallimport/)
 * (@wpallimport)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/date-format-when-importing/#post-9808966)
 * Hi [@osipmikhail](https://wordpress.org/support/users/osipmikhail/)
 * Can you please elaborate on which date field is changing, and provide a “before”
   and “after” screenshot?
 *  Thread Starter [osipmikhail](https://wordpress.org/support/users/osipmikhail/)
 * (@osipmikhail)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/date-format-when-importing/#post-9808986)
 * Sure, each record has the title set to take in the division name, the date and
   division number.
 * The excel screenshot shows what data I’m importing, the WordPress screenshot 
   shows what happens after the data is imported. The date is in American format,
   the trouble is the url’s will be based in what shows in the title of the record.
   It won’t match because the date format is different.
 * [http://conservativeactive.com/testing/wp-content/uploads/2017/12/data.png](http://conservativeactive.com/testing/wp-content/uploads/2017/12/data.png)
   
   [http://conservativeactive.com/testing/wp-content/uploads/2017/12/data1.png](http://conservativeactive.com/testing/wp-content/uploads/2017/12/data1.png)
 *  Plugin Author [WP All Import](https://wordpress.org/support/users/wpallimport/)
 * (@wpallimport)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/date-format-when-importing/#post-9813724)
 * Hi [@osipmikhail](https://wordpress.org/support/users/osipmikhail/)
 * I assume that you’re importing the date into a custom field or something, and
   that’s being used in the title – is that correct? If so, the problem is most 
   likely that PHP’s strtotime() function assumes American date format if you use
   slashes. To fix this, you can change the slashes to dots using a PHP function
   in the import ([see documentation](http://www.wpallimport.com/documentation/developers/execute-php/)):
 * `[str_replace("/",".",{division_date[1]})]`
 * If that doesn’t help, then we would need to see the data and import settings 
   to advise further. In this case, please replicate the issue at [http://www.wpallimport.com/debug/](http://www.wpallimport.com/debug/)
   and open a ticket at [http://www.wpallimport.com/support/](http://www.wpallimport.com/support/)
   withe more details so that we can help out.
 *  Thread Starter [osipmikhail](https://wordpress.org/support/users/osipmikhail/)
 * (@osipmikhail)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/date-format-when-importing/#post-9813757)
 * Hi,
 * Thanks for coming back to me, appreciate considering its the holiday season.
 * I did the above and even though it does exactly what it was supposed to do the
   date is still in American format.
 * It was my fault not to state precisely what I was importing to, I am using the
   Pods plugin, the date format I have set is to dd/mm/yyyy although I’m not exactly
   sure if not using pre-determined format makes a difference.
 *  [Jim True](https://wordpress.org/support/users/jimtrue/)
 * (@jimtrue)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/date-format-when-importing/#post-9813760)
 * If you’re importing into Custom Meta, there is no American format; dates are 
   stored in ANSI standard of yyyy-mm-dd hh:mm:ss because the date is actually in
   a key/value pair
 *  Thread Starter [osipmikhail](https://wordpress.org/support/users/osipmikhail/)
 * (@osipmikhail)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/date-format-when-importing/#post-9813761)
 * Not sure if this helps but you can see just from the import process it already
   has set the date to US format before even setting where the data should go to.
 * [http://conservativeactive.com/testing/wp-content/uploads/2017/12/date.png](http://conservativeactive.com/testing/wp-content/uploads/2017/12/date.png)
 *  Thread Starter [osipmikhail](https://wordpress.org/support/users/osipmikhail/)
 * (@osipmikhail)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/date-format-when-importing/#post-9813764)
 * Sorry just saw Jim’s response.
 * In that case is there anything I can do?
 *  Plugin Author [WP All Import](https://wordpress.org/support/users/wpallimport/)
 * (@wpallimport)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/date-format-when-importing/#post-9818633)
 * Hey [@osipmikhail](https://wordpress.org/support/users/osipmikhail/)
 * Are you using the {division_date[1]} element in the title? If so, try using this
   PHP function on that element to fix the format:
 *     ```
       function my_fix_date( $date ) {
       	return DateTime::createFromFormat( 'n/j/Y', $date )->format( 'j/n/Y' );	
       }
       ```
   
 *  Plugin Author [WP All Import](https://wordpress.org/support/users/wpallimport/)
 * (@wpallimport)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/date-format-when-importing/#post-9825303)
 * Marking this as resolved. [@osipmikhail](https://wordpress.org/support/users/osipmikhail/)
   please let us know if you still have any questions about this issue.

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

The topic ‘Date format when importing’ 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/)

## Tags

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

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