Date sort in 22/Jan/11 (d/M/y) format possible?

Date sort in 22/Jan/11 (d/M/y) format possible?

mrtomtommrtomtom Posts: 7Questions: 4Answers: 0
edited May 2011 in Plug-ins
Hi there,

Does anyone know if it is possible to get the column sorting to support dates such as the following:

22/Jan/11 (d/M/y)
11/Feb/09
etc

I need to have this as the table is being used by teams across a few countries and this is the best the US/UK date confusion. I tried modifying the uk_date functions to include a switch statements that changed "Jan"-> 01, "feb" ->02 etc but it didn't seem to work.

Any help would be greatly appreciated.

Thanks,

Tom

Replies

  • allanallan Posts: 63,687Questions: 1Answers: 10,500 Site admin
    Hi Tom,

    Yup this is certainly possible :-). But there are no plug-ins currently available on the site which do exactly this :-(. So hacking one together is required :-)

    What you can do is something a bit like this:

    http://datatables.net/plug-ins/sorting#weekday combined with this http://datatables.net/plug-ins/sorting#date_euro_short - i.e. convert the month names into numbers and then sort numerically.

    Allan
This discussion has been closed.