Title: Sort Date order
Last modified: August 22, 2016

---

# Sort Date order

 *  Resolved [dabir0070](https://wordpress.org/support/users/dabir0070/)
 * (@dabir0070)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/sort-date-order/)
 * I have a table with Column B containing date values in form “Saturday 10 May,
   2014″. I used this:- [table id=4 row_order=”sort” row_order_sort_column=”B” row_order_sort_direction
   =”DESC”/] but I find the sorting was alphabetical. I also tried direction with“
   DATE”.
 * In the browser, clicking on Date column, sorts it correctly. How can I make this
   the default. The table is at the end of the homepage [http://www.tarbiyyat.org.uk](http://www.tarbiyyat.org.uk)
 * Many thanks for the plug in – I was using fileaway, but this is much better.
 * [https://wordpress.org/plugins/tablepress/](https://wordpress.org/plugins/tablepress/)

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

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/sort-date-order/#post-5780834)
 * Hi,
 * thanks for your post, and sorry for the trouble.
 * The Table Row Order Extension can only sort alphabetically, it does not have 
   other algorithsm, like for date sorting.
 * So, instead of using that here, you can tell the DataTables JS library to perform
   an initial sort when the page is loaded. For that, just add this to the “Custom
   Commands” textfied on the “Edit” screen of the table:
 *     ```
       "order": [[ 1, 'desc' ]]
       ```
   
 * (The `1` refers to the second column as counting starts with 0 in the code.)
 * Regards,
    Tobias
 *  Thread Starter [dabir0070](https://wordpress.org/support/users/dabir0070/)
 * (@dabir0070)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/sort-date-order/#post-5780837)
 * Brilliant – that fixed it! I used ‘asc’. Thank you coming your way …
 *  Thread Starter [dabir0070](https://wordpress.org/support/users/dabir0070/)
 * (@dabir0070)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/sort-date-order/#post-5780839)
 * How do you reply so quick and fix so quick? Do you not sleep?
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/sort-date-order/#post-5780841)
 * Hi,
 * no problem, you are very welcome! 🙂 Good to hear that this helped!
    Haha, no,
   I do sleep 🙂 But I just happen to check the forums often.
 * Best wishes,
    Tobias
 * P.S.: In case you haven’t, please [rate TablePress](http://wordpress.org/support/view/plugin-reviews/tablepress)
   here in the plugin directory. Thanks!

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

The topic ‘Sort Date order’ 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/)

 * 4 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [11 years, 4 months ago](https://wordpress.org/support/topic/sort-date-order/#post-5780841)
 * Status: resolved