Title: Change create date format admin order
Last modified: June 14, 2021

---

# Change create date format admin order

 *  Resolved [Cees Rijken](https://wordpress.org/support/users/connectcase/)
 * (@connectcase)
 * [4 years, 12 months ago](https://wordpress.org/support/topic/change-create-date-format-admin-order/)
 * Hi there,
 * my WordPress installation is completely Dutch and my date format in the WP settings
   specify that it shoud be: “dd-mm-yyyy”.
 * However when adding a new admin order, the create date is specified as “yyyy-
   mm-dd” and the Datepicker acts accordingly.
 * No biggie, but confusing for my Dutch client and after many hours of googling,
   I can’t seem to find the hook where to change this.

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

 *  [Mirko P.](https://wordpress.org/support/users/rainfallnixfig/)
 * (@rainfallnixfig)
 * [4 years, 12 months ago](https://wordpress.org/support/topic/change-create-date-format-admin-order/#post-14556160)
 * Hi [@connectcase](https://wordpress.org/support/users/connectcase/),
 * Order “date created” format is hard-coded and does not follow the site settings.
   It’s always displaying as `Y-m-d`.
 * You can change it to `d/m/Y` format by following these steps:
 * 1. [Create a child theme](https://docs.woocommerce.com/document/set-up-and-use-a-child-theme/),
   copy the `class-wc-meta-box-order-data.php` file found in `wp-content/plugins/
   woocommerce/includes/admin/meta-boxes/` and paste it there.
    2. Open the file,
   go to row 236 and change the date format from `Y-m-d` to `d/m/Y`.
 * 
    Link to image: [https://i.imgur.com/bg3dZdb.png](https://i.imgur.com/bg3dZdb.png)
 * You could update directly the original file but this is not recommended since
   updating core WooCommerce will result in the customization being removed.
 * Hope this helps!
 *  [Mirko P.](https://wordpress.org/support/users/rainfallnixfig/)
 * (@rainfallnixfig)
 * [4 years, 12 months ago](https://wordpress.org/support/topic/change-create-date-format-admin-order/#post-14556389)
 * Hi there,
 * Just to integrate the information on my previous reply, if you want to use a 
   child theme so you won’t need to update the original file, you can copy/paste`
   class-wc-meta-box-order-data.php` in your child theme folder recreating the same
   path (e.g. Your-Child-Theme- Folder/woocommerce/includes/admin/meta-boxes/class-
   wc-meta-box-order-data.php).
 * Then, in order for it to work properly, you’ll need to add the following snippet
   in the functions.php file of your child theme folder.
 *     ```
       // Order details - change the date format in d/m/Y
       require 'woocommerce/includes/admin/meta-boxes/class-wc-meta-box-order-data.php';
       ```
   
 *  Thread Starter [Cees Rijken](https://wordpress.org/support/users/connectcase/)
 * (@connectcase)
 * [4 years, 12 months ago](https://wordpress.org/support/topic/change-create-date-format-admin-order/#post-14557126)
 * Cheers Mirko, thanks for the swift reply!
 * Weird stuff that the date format is hardcoded, but since I already use a child
   theme, I can deal with it.
 *  [Mirko P.](https://wordpress.org/support/users/rainfallnixfig/)
 * (@rainfallnixfig)
 * [4 years, 12 months ago](https://wordpress.org/support/topic/change-create-date-format-admin-order/#post-14560358)
 * Hi [@connectcase](https://wordpress.org/support/users/connectcase/),
 * Thanks for getting back.
 * The above solution should work as I’ve tested it on my WooCommerce test site.
 * I’m going to mark this as resolved – if you have any further questions, you can
   start a new thread.
 * Cheers!
 *  Thread Starter [Cees Rijken](https://wordpress.org/support/users/connectcase/)
 * (@connectcase)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/change-create-date-format-admin-order/#post-14575680)
 * Sorry for the late reply, but this does not seem to work….
 * Added /woocommerce/includes/admin/meta-boxes/class-wc-meta-box-order-data.php
   to my child theme, edited line 236, refreshed a couple of times, emptied cache
   etc., but no dice….
 *  [Mirko P.](https://wordpress.org/support/users/rainfallnixfig/)
 * (@rainfallnixfig)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/change-create-date-format-admin-order/#post-14576390)
 * Hi there,
 * > Sorry for the late reply, but this does not seem to work….
 * Did you add the snippet in the `functions.php` file of your child theme? I’ll
   write down here for your reference:
 *     ```
       // Order details - change the date format in d/m/Y
       require 'woocommerce/includes/admin/meta-boxes/class-wc-meta-box-order-data.php';
       ```
   
 * You’ll need to enter the exact path where your `class-wc-meta-box-order-data.
   php` is located in the child theme. If you want to use the above you’ll want 
   to create all folders woocommerce/includes/admin/meta-boxes/ in your child theme
   and paste the updated class-wc-meta-box-order-data.php file in the meta-boxes
   folder.
 * If you still have issues feel free to open a new thread.
 * Thanks.
 *  Thread Starter [Cees Rijken](https://wordpress.org/support/users/connectcase/)
 * (@connectcase)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/change-create-date-format-admin-order/#post-14578024)
 * Yes, it works now (I forgot the require-bit in functions.php).
 * However, when saving the admin order, you will get: “please match the requested
   format”, so I changed the pattern to my desired format.
 * But when choosing a date from the picker, it is still the old (US) format, so
   I will still get the requested format-error when trying to save. I should look
   for that somewhere in a JS-file, I reckon?
 *  Thread Starter [Cees Rijken](https://wordpress.org/support/users/connectcase/)
 * (@connectcase)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/change-create-date-format-admin-order/#post-14578298)
 * So I added a unique id to the create-date-field, wrote a little JS script to 
   target that id and set the dateFormat as I wanted it, and then enqued the script.
   Seems to work!

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

The topic ‘Change create date format admin order’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

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

 * 8 replies
 * 2 participants
 * Last reply from: [Cees Rijken](https://wordpress.org/support/users/connectcase/)
 * Last activity: [4 years, 11 months ago](https://wordpress.org/support/topic/change-create-date-format-admin-order/#post-14578298)
 * Status: resolved