Editor - Format DateTime from ISO 8601
Editor - Format DateTime from ISO 8601
clementib
Posts: 4Questions: 2Answers: 0
I just started using DataTables today and absolutely love it! One question... My application returns data with the date in ISO 8601 format (e.g. 2014-08-01T00:00:00). I need that date on my DataTable to be displayed in MM/DD/YYYY format. Any ideas? I've been looking for the past couple hours, but I can't find a solution. Thanks!
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Use the columns.render feature with your own re-formatting function.
There's an example of usage here: http://www.datatables.net/examples/advanced_init/column_render.html
You can also use the PHP methods in the Editor libraries to do this if you are using PHP. There is an example here: https://editor.datatables.net/examples/simple/dates.html .
Allan