Sort by time

Sort by time

TarponWebGuyTarponWebGuy Posts: 10Questions: 0Answers: 0
edited February 2012 in General
Hello,
I have column that needs to sort by a 12-hour clock time such as "4:32 PM". By default, it seems to sort by the highest number. I can format the data any way it needs to be, but I need it to sort correctly. Any advice would be appreciated.

Thanks!

Replies

  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin
    Have a look at the hidden title numeric sorting plug-in: http://datatables.net/plug-ins/sorting#hidden_title . That would be an option if you can control the output. Otherwise it would be a case of writing a sorting plug-in that will format the time into a sortable integer.

    Allan
  • TarponWebGuyTarponWebGuy Posts: 10Questions: 0Answers: 0
    edited February 2012
    Perfect! Thank you for your quick response! Love your plug-in by the way; it is just awesome!
This discussion has been closed.