Tip for local dates ordering (eg. FR)
Tip for local dates ordering (eg. FR)
Glaubule
Posts: 2Questions: 0Answers: 0
_This example works with older Datatable versions.
1st select date from DB in 2 ways and name them :
SELECT DISTINCT
DATE_FORMAT(date_add, "%d-%m-%Y %H:%i:%s") AS frdate,
DATE_FORMAT(date_add, "%Y-%m-%dT%H:%i:%sZ") AS jsdate,
...
2nd map your column data to 'jsdate' result
3rd define your column rendering in ColumnDefs this way
...
render: function ( data, type, row ) {
return row.date;
}
...
So display and data are separated
This discussion has been closed.
Replies
Oups ! 3 step like this :
Nice tip - thanks for posting that!
Allan