Need to sort by this format

Need to sort by this format

bombhausbombhaus Posts: 9Questions: 1Answers: 0
edited October 2011 in General
09:50:00 AM 10-11-2011
08:50:00 AM 10-04-2011

I can't change this format (output my our DataCloud software) and but I need to be able to sort by it.
Current it sorts by the first number, not using being accurate as it can be an earlier hour in the day, but multiple days or months in the past.

Please give me some direction.

Replies

  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    edited October 2011
    you can change the format all you want on the client side (in DataTables, via fnRender) without changing the source
    http://www.datatables.net/ref#fnRender

    or have a hidden column based on this timestamp, but convert it to something that sorts better, and sort by that hidden column as a proxy
    http://www.datatables.net/ref#iDataSort

    or write your own sort routine for that timestamp.
    http://www.datatables.net/plug-ins/sorting - existing plug-in sort routines
    http://www.datatables.net/development/sorting - how to write your own sorting routines
This discussion has been closed.