write a function to sort date and time column in a table in javascript code example
Example: sort data according to date in js
array.sort(function(a,b){
// Turn your strings into dates, and then subtract them
// to get a value that is either negative, positive, or zero.
return new Date(b.date) - new Date(a.date);
});