How to enable sorting for dates like the following "Mon 16 Apr 2018"
How to enable sorting for dates like the following "Mon 16 Apr 2018"
PierceMcGeough90
Posts: 3Questions: 2Answers: 0
This is just an extract but it seems to order by month then day.
Im currently getting:
Wed 20 Apr 2016
Wed 20 Apr 2016
Wed 06 Apr 2016
Wed 06 Apr 2016
Thu 21 Apr 2016
Fri 29 Apr 2016
Fri 15 Apr 2016
I am looking for
Wed 06 Apr 2016
Wed 06 Apr 2016
Fri 15 Apr 2016
Wed 20 Apr 2016
Wed 20 Apr 2016
Thu 21 Apr 2016
Fri 29 Apr 2016
This discussion has been closed.
Answers
Your first example looks like a simple string sort in descending order. Are you actually implementing date sorting? If not, you might need to read this:
https://datatables.net/blog/2014-12-18
Use the plug-in introduced in this post.
Allan
I had found this article https://editor.datatables.net/examples/dates/formatting
But as you can see it doesn't work on the registered date field.
Will look into your answers thanks.