1. Home
  2. Knowledge Base
  3. WooCommerce Product Table
  4. Product Table Options

Product table date sorting and date / time format

If you want to display date and time formats in WooCommerce Product Table, then there are several options for controlling how dates and times are treated. For example, you can tell WooCommerce Product Table which columns are dates so that it will sort by date rather than alphabetically.

Extra date columns

The Date column? option lets you designate specific columns in your table as dates, so that the column can be sorted by date correctly. This can be useful for custom fields or taxonomies which contain dates, as otherwise they will be sorted alphabetically instead of by date.

The option appears when you edit an existing table and open the advanced column editor. It is not available for all column types:

WooCommerce Product Table Links and Date Column

Date format

The Date format option lets you control how the Date column is formatted in your product table. It is also used for any other column you have specified as a date (see above).

If you don’t set this option, the default format in your WordPress settings will be used (see 'Date Format' under Settings → General in WordPress).

You can set the date format to any valid date/time format string. For example: F j, Y will format the dates in this format: "August 24, 2024". See the WordPress Codex for more information.

The date format isn't working for custom fields

If the date format is wrong despite using the Date Columns and Date Format options, then your custom field plugin is probably overriding the date format. To fix it, go to the settings for your custom field (e.g. in Advanced Custom Fields, or whichever custom field plugin you are using) and look for the date format option. Try setting the date format here so that it matches the setting in WooCommerce Product Table.

To get this working, you may need to remove the Date Format option from your Product Table shortcode. This will prevent it from conflicting with the date format in the custom field plugin.

Related Articles

If searching the knowledge base hasn't answered your question, please contact support.