DateTime Filter is not working in Excel after export Datatable (DD/MM/YYYY HH:MM:SS A)
DateTime Filter is not working in Excel after export Datatable (DD/MM/YYYY HH:MM:SS A)
while Exporting a Datatable Excel ,without hh:mm:ss a date filter work Fine but adding hh:mm:ss a filter is not applied to column it looks like a string ,after Double click on value that value changed to date format
ill try to change the date format in export options but it only work for (YYYY-MM-DD) this format only add hh:mm:ss filter is not applied in excel ,plz find the image i want like this plz guide me.
,
exportOptions: {
columns: ':visible',
//columns: [0, 1, 2, 3, 4, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34],
format: {
body: function (data, row, column, node) {
if (column == 5) {
data = moment(data, 'DD/MM/YYYY hh:mm A"').format('YYYY-MM-DD hh:mm A')
return data ;
//return /*** SOMETHING HERE ??***/+ " " + "AM"
} else {
return data;
}
}
}
},
This question has an accepted answers - jump to answer
Answers
I'm not actually sure what you are asking I'm afraid. I'd be surprised if Excel wasn't filtering ISO8601 formatted data, which it looks like you've got in those three columns. I think we'd need a test case showing the issue as requested in the forum rules.
Allan