Title: Include time for Order Date
Last modified: November 17, 2017

---

# Include time for Order Date

 *  Resolved [mowlman](https://wordpress.org/support/users/mowlman/)
 * (@mowlman)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/include-time-for-order-date/)
 * I would like to include the time for the Order Date, such as Tuesday 11/07/2017,
   07:35pm
 * Option1: Is there a way to format the order date to include time?
 * I did find /wp-content/plugins/woocommerce-delivery-notes/includes/wcdn-template-
   functions.php
 * And I commented out original line 265 which is within function: wcdn_get_order_info
   and added the line with the formatting I would like:
 *     ```
       	$fields['order_date'] = array( 
       		'label' => __( 'Order Date', 'woocommerce-delivery-notes' ),
       	//	'value' => date_i18n( get_option( 'date_format' ), strtotime( $wdn_order_order_date ) )
       		'value' => date_i18n(__( 'l m/d/Y, h:ia', 'woocommerce' ), strtotime( $wdn_order_order_date ) ) //bill change date format
       	);
       ```
   
 * Option2: But is there a way to override this function?
 * So any way to override for either option 1 or option2?
 * Thank you for your time.

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

 *  [bhavik.kiri](https://wordpress.org/support/users/bhavikkiri/)
 * (@bhavikkiri)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/include-time-for-order-date/#post-9715202)
 * Hi [@mowlman](https://wordpress.org/support/users/mowlman/),
 * > So any way to override for either option 1 or option2?
 * Yes, you can override the date format using the filter “wcdn_order_info_fields”
   given in the plugin.
 *     ```
       add_filter ( 'wcdn_order_info_fields', 'update_wcdn_order_date_value', 10 , 2  ) ;
   
       function update_wcdn_order_date_value ( $values, $order ) {
   
       	$wdn_order_id =  ( version_compare( get_option( 'woocommerce_version' ), '3.0.0', ">="  ) ) ? $order->get_id() : $order->id;
       	$order_post = get_post( $wdn_order_id );
       	$wdn_order_order_date =  ( version_compare( get_option( 'woocommerce_version' ), '3.0.0', ">="  ) ) ? $order_post->post_date : $order->order_date;
   
       	$values['order_date'] = array( 
       		'label' => __( 'Order Date', 'woocommerce-delivery-notes' ),
       		'value' => date_i18n( __( 'l m/d/Y, h:ia', 'woocommerce' ), strtotime( $wdn_order_order_date ) )
       	);
       	return $values;
       }
       ```
   
 * You need to add the above code snippet in your active theme’s functions.php file.
 * Please let me know the results.
 * Regards,
    Bhavik
 *  Thread Starter [mowlman](https://wordpress.org/support/users/mowlman/)
 * (@mowlman)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/include-time-for-order-date/#post-9756749)
 * THANKS! Works Great.

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

The topic ‘Include time for Order Date’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-delivery-notes/assets/icon-256x256.jpg?rev=2829362)
 * [Print Invoice & Delivery Notes for WooCommerce](https://wordpress.org/plugins/woocommerce-delivery-notes/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-delivery-notes/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-delivery-notes/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-delivery-notes/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-delivery-notes/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-delivery-notes/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [mowlman](https://wordpress.org/support/users/mowlman/)
 * Last activity: [8 years, 6 months ago](https://wordpress.org/support/topic/include-time-for-order-date/#post-9756749)
 * Status: resolved