Title: Date field not sorting correctly
Last modified: October 27, 2018

---

# Date field not sorting correctly

 *  Resolved [brenonline](https://wordpress.org/support/users/brenonline/)
 * (@brenonline)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/date-field-not-sorting-correctly/)
 * Hi there:
 * Just started using Table Press. My experience has been good. It’s very easy to
   use and the table looks great.
 * I am having difficulty though getting the date field – the last in a 3 column
   75 row table to sort correctly when using that option in the header row.
 * Sorting from oldest to newest I have 08/15/2019 displaying before 09/29/2018.
   This column sorts perfectly in Apple numbers and Google Spreadsheets. It also
   sorts correctly in the TablePress Table Content section in the back end, just
   not on the front end of my site. It also sorts correctly on the front end after
   doing a page refresh.
 * I have followed instructions from the TablePress FAQ and installed the TablePress
   Extension: DataTables Sorting Plugin.
 * I have also added the following: “columnDefs”: [ { “type”: “formatted-num”, “
   targets”: [ 2 ] } ] to the Custom Commands section.
 * Not sure what I’m doing wrong.
 * Thanks

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

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/date-field-not-sorting-correctly/#post-10824170)
 * Hi,
 * thanks for your post, and sorry for the trouble.
 * Can you please post a link to the page with the table where this problem happens,
   so that I can take a direct look? Thanks!
 * Regards,
    Tobias
 *  Thread Starter [brenonline](https://wordpress.org/support/users/brenonline/)
 * (@brenonline)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/date-field-not-sorting-correctly/#post-10831055)
 * Hi Tobias:
 * Thank you for the response. The page is password protected. Is there anywhere
   I could send you a log-in?
 * If not I will duplicate the issue on non-protected page.
 * Bren
 *  Thread Starter [brenonline](https://wordpress.org/support/users/brenonline/)
 * (@brenonline)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/date-field-not-sorting-correctly/#post-10831263)
 * Hi Tobias:
 * I created a non-protected test page so you can see the issue I am having with
   sorting the table expiration column.
 * [https://crisisinterventionsolutions.com/tabletest/](https://crisisinterventionsolutions.com/tabletest/)
 * Thanks again,
 * B
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/date-field-not-sorting-correctly/#post-10831559)
 * Hi,
 * thanks! Please try this modified “Custom Command”:
 *     ```
       "columnDefs": [ { "type": "date", "targets": [ 2 ] } ]
       ```
   
 * You can then deactivate the TablePress Sorting Plugins Extension again.
 * Regards,
    Tobias
 *  Thread Starter [brenonline](https://wordpress.org/support/users/brenonline/)
 * (@brenonline)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/date-field-not-sorting-correctly/#post-10834296)
 * Hey Tobias:
 * That worked perfectly!
 * Thanks so much.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/date-field-not-sorting-correctly/#post-10837210)
 * Hi,
 * no problem, you are very welcome! 🙂 Good to hear that this helped!
 * Best wishes,
    Tobias
 * P.S.: In case you haven’t, please [rate TablePress](https://wordpress.org/support/plugin/tablepress/reviews/#new-post)
   here in the plugin directory. Thanks!

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

The topic ‘Date field not sorting correctly’ is closed to new replies.

 * ![](https://ps.w.org/tablepress/assets/icon.svg?rev=3192944)
 * [TablePress - Tables in WordPress made easy](https://wordpress.org/plugins/tablepress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tablepress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tablepress/)
 * [Active Topics](https://wordpress.org/support/plugin/tablepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tablepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tablepress/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [7 years, 7 months ago](https://wordpress.org/support/topic/date-field-not-sorting-correctly/#post-10837210)
 * Status: resolved