Date format when export datatable to excel
Date format when export datatable to excel
alogo
Posts: 2Questions: 0Answers: 0
In my datatable I have a column with date format but when export to excel the format date change to General then I can´t sort from the most recent date to the oldest date
This discussion has been closed.
Replies
Possible Duplicate Question https://datatables.net/forums/discussion/39605/customize-excel-export
Thank you @Apezdr, but I don't think so, I just need date format in excel. But when export the format is "General" and not "Date"
Does this answer your question?
https://datatables.net/forums/discussion/40660
If not then maybe start with posting your Datatables init code showing the column and buttons definitions.
Kevin
Kevin had a closer example to what you're asking about but the answer is the same, you'll have to dig into the customization option of the excelHtml5 button https://datatables.net/reference/button/excelHtml5.
A helpful hint, its not easy at all to manipulate the excel document generation at length. I'd see if you can just adjust the date format that datatables spits out and see if it fixes your issue.
Hello @alogo, did you find a work around this? I'm having the same issue
hello,
When the grid data is exported ,the date columns are exported as "General" datatype. By default this needs to be exported as "Short Date".
did anyone find a solution for this ?