Title: Postcode Datetime conversion issue
Last modified: July 27, 2020

---

# Postcode Datetime conversion issue

 *  Resolved [iwanwilaga](https://wordpress.org/support/users/iwanwilaga/)
 * (@iwanwilaga)
 * [6 years ago](https://wordpress.org/support/topic/postcode-datetime-conversion-issue/)
 * Hello there!
 * I got stuck.
    At the “Convert timestamp data to date format” option If i leave
   it checked, the user’s postcode fields, eg.: ‘billing_postcode’ and ‘shipping_postcode’
   gets generated into Datetime format (as you said in that alert info), but if 
   i uncheck it then after export-import the postcodes are OKAY, but the ‘user_registered’(@
   wp_users ) becomes ‘0000-00-00 00:00:00 ‘ at every freshly imported users.
 * The postcode here is a 4 digit number.
    Can this be server/mysql settings specific
   issue? As the from and to website are on diff. hosts. Thank you, best wishes!
   Wiktor
    -  This topic was modified 6 years ago by [iwanwilaga](https://wordpress.org/support/users/iwanwilaga/).
    -  This topic was modified 6 years ago by [iwanwilaga](https://wordpress.org/support/users/iwanwilaga/).

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

 *  Plugin Author [Javier Carazo](https://wordpress.org/support/users/carazo/)
 * (@carazo)
 * [6 years ago](https://wordpress.org/support/topic/postcode-datetime-conversion-issue/#post-13176784)
 * [@iwanwilaga](https://wordpress.org/support/users/iwanwilaga/),
 * You can use this filter: acui_export_non_date_keys
 * Or deactivate the datetime format conversion.
 * Anyway in next version I will include those two fields to prevent the conversion
   by default.
 * Stay tuned and update. Next version will fix it.
 *  Thread Starter [iwanwilaga](https://wordpress.org/support/users/iwanwilaga/)
 * (@iwanwilaga)
 * [6 years ago](https://wordpress.org/support/topic/postcode-datetime-conversion-issue/#post-13194665)
 * Hello Javier,
 * Initially i tried this import process with the datetime format conversion activated
   and deactivated as well. That’s when the but ‘user_registered’ fields got knocked
   out: ‘0000-00-00 00:00:00‘ value at every freshly imported users.
 * So either way has problem if i get it right.
 * NOw i put this into functions.php:
 *     ```
       function exclude_problematic_datetime_keys( $keys ){
           $keys[] = 'user_registered';
           $keys[] = 'billing_postcode';
           $keys[] = 'shipping_postcode';
   
           return $keys;
       } 
       add_filter( 'acui_export_non_date_keys', 'exclude_problematic_datetime_keys', 10, 1 );
       ```
   
 * It seems not running, (at least no change in the results, all 3 keys are with
   same problems.
 * I tried this with the user list which i exported by the timestamp conversion 
   option CHECKED.
 * **UPDATE**
    NOw it seems if i export with the ..conversion UNCHECKED, then the
   hook probably works, and all 3 data is untouched by the converter. Thats happy
   thing! So in this case should it be Emphasized, that the export always should
   have been done UNCHECKED if we wanna use the above hook?
 * Any ideas? Thank you..
    Wiktor
    -  This reply was modified 6 years ago by [iwanwilaga](https://wordpress.org/support/users/iwanwilaga/).
    -  This reply was modified 6 years ago by [iwanwilaga](https://wordpress.org/support/users/iwanwilaga/).
      Reason: update added
    -  This reply was modified 6 years ago by [iwanwilaga](https://wordpress.org/support/users/iwanwilaga/).
 *  Plugin Author [Javier Carazo](https://wordpress.org/support/users/carazo/)
 * (@carazo)
 * [6 years ago](https://wordpress.org/support/topic/postcode-datetime-conversion-issue/#post-13198771)
 * Update to the last version and check again.
 * It should work.
 *  Thread Starter [iwanwilaga](https://wordpress.org/support/users/iwanwilaga/)
 * (@iwanwilaga)
 * [6 years ago](https://wordpress.org/support/topic/postcode-datetime-conversion-issue/#post-13262162)
 * Hello Javier,
 * Here are my updates on the updated version 😉 :
    - I did update to latest (1.15.8), and exported orders with the ‘Convert timestamp
      data to date format’ CHECKED.
    - Also (just in case) i run the export in Troubleshoot mode, so only your plugin
      was activated.
    - Now all field got proper format, except this: ‘shipping_phone’.
       Can you please
      also include this on your plugin format/exclude logic, or what solution you
      suggest for now?
    - Cheers, best wishes,
       Wiktor
 *  Plugin Author [Javier Carazo](https://wordpress.org/support/users/carazo/)
 * (@carazo)
 * [6 years ago](https://wordpress.org/support/topic/postcode-datetime-conversion-issue/#post-13266939)
 * [@iwanwilaga](https://wordpress.org/support/users/iwanwilaga/),
 * I have just included. Update.
 * Anyway there is a filter to include as many fields as you want.
 *  Thread Starter [iwanwilaga](https://wordpress.org/support/users/iwanwilaga/)
 * (@iwanwilaga)
 * [6 years ago](https://wordpress.org/support/topic/postcode-datetime-conversion-issue/#post-13269908)
 * HEllo.
 * Cool! The update worked.
    I am not sure that the filter that i added, did anything
   at all. To me it seems only that code does effect that you applied into your 
   plugin codebase.
 * Should this piece of code work by the way? OR what did i do wrong? This didn’t
   work for me on ‘shipping_phone’ yesterday, before your latest update.)
 *     ```
       function exclude_problematic_datetime_keys( $keys ){
           $keys[] = 'user_registered';
           $keys[] = 'billing_postcode';
           $keys[] = 'shipping_postcode';
           $keys[] = 'shipping_phone';
   
           return $keys;
       } 
       add_filter( 'acui_export_non_date_keys', 'exclude_problematic_datetime_keys', 10, 1 );
       ```
   
 * (maybe the add_filter line is wrong with those 2 explicit priority + param number
   parameters?)
    Thank you! Viktor
    -  This reply was modified 6 years ago by [iwanwilaga](https://wordpress.org/support/users/iwanwilaga/).
    -  This reply was modified 6 years ago by [iwanwilaga](https://wordpress.org/support/users/iwanwilaga/).
    -  This reply was modified 6 years ago by [iwanwilaga](https://wordpress.org/support/users/iwanwilaga/).
 *  Plugin Author [Javier Carazo](https://wordpress.org/support/users/carazo/)
 * (@carazo)
 * [6 years ago](https://wordpress.org/support/topic/postcode-datetime-conversion-issue/#post-13273123)
 * [@iwanwilaga](https://wordpress.org/support/users/iwanwilaga/),
 * This filter should work.
 * This is strange.

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

The topic ‘Postcode Datetime conversion issue’ is closed to new replies.

 * ![](https://ps.w.org/import-users-from-csv-with-meta/assets/icon-256x256.png?
   rev=1174343)
 * [Import and export users and customers](https://wordpress.org/plugins/import-users-from-csv-with-meta/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/import-users-from-csv-with-meta/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/import-users-from-csv-with-meta/)
 * [Active Topics](https://wordpress.org/support/plugin/import-users-from-csv-with-meta/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/import-users-from-csv-with-meta/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/import-users-from-csv-with-meta/reviews/)

## Tags

 * [datetime](https://wordpress.org/support/topic-tag/datetime/)
 * [timestamp](https://wordpress.org/support/topic-tag/timestamp/)
 * [wrong format](https://wordpress.org/support/topic-tag/wrong-format/)

 * 7 replies
 * 2 participants
 * Last reply from: [Javier Carazo](https://wordpress.org/support/users/carazo/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/postcode-datetime-conversion-issue/#post-13273123)
 * Status: resolved