How to Create Sorting with Date Based on Year, Month, Date

How to Create Sorting with Date Based on Year, Month, Date

datatableuser7datatableuser7 Posts: 2Questions: 1Answers: 0
edited September 2016 in Free community support

I am new to html Dattables and I have tried all possible ways to make the date asc, desc sorting but it does not work.

$(document).ready(function() {
$('#example').DataTable({
"aoColumns": [
null,
null,
null,
null,
//{ type: 'num-html'},
{ type: "date-range" },
//{ "sType": "numeric-number" },
null
]
});
} );

copied the table and html from here
https://datatables.net/examples/basic_init/table_sorting.html

my order of date in is as below sample dates
12 JAN 2009
15 APR 2011
25 JUL 2011
12 JAN 2009
29 MAR 2012
28 NOV 2008
02 DEC 2012
06 AUG 2012

Answers

  • datatableuser7datatableuser7 Posts: 2Questions: 1Answers: 0
    edited September 2016

    I have time coming from model
    12 JAN 2009 00:00:00
    15 APR 2011 00:00:00
    25 JUL 2011 00:00:00
    12 JAN 2009 00:00:00
    29 MAR 2012 00:00:00
    28 NOV 2008 00:00:00
    02 DEC 2012 00:00:00
    06 AUG 2012 00:00:00

This discussion has been closed.