I have a datatable that has a date field.
I want to change this same field from 2012-05-01 00: 00: 00.000 to 2012-05-01.
Is it possible?
I have a datatable that has a date field.
I want to change this same field from 2012-05-01 00: 00: 00.000 to 2012-05-01.
Is it possible?
Yes it is possible.
You should use the render function of the datatables plugin.
Example:
{
"data": "minha_data",
"render": function (data) {
var date = new Date(data);
var dataFormatada = date.getDate() + '/' + date.getMonth() + '/' + date.getFullYear();
return dataFormatada;
}
}
This in the declaration of your columns.
I would advise using a date format plugin such as link
Edited
More information about Date in javascript link