How can I add a custom oSort to only one column

How can I add a custom oSort to only one column

abraharlabraharl Posts: 1Questions: 1Answers: 0

In have table that displays a list of items that are retrieved from a database via an AJAX call to an external web service. Each item being its own row. One of the columns is "Last Updated" which displays how long its been since that item was last updated. Examples:

"9 days, 10 hours, 14 minutes"
"1 day, 4 hours, 25 minutes"
"5 hours, 15 minutes, 35 seconds"
"1 week, 3 days, 6 hours"

For this column, I want to update datatable's asc and desc sort functions so that the most recently updated ones appear first when in asc order and the least recently updated ones appear when sorted in desc order. I've read the documentation on sorting and it looks like $.fn.dataTableExt.oSort is what I want but I can't tell how to make it apply my custom sorting code to only that column so that datatables uses it's default sorting algorithms for all the rest.

What's the easiest way to apply a custom oSort to a specific column and only that column?

This discussion has been closed.