datatime value display
datatime value display
agg9505
Posts: 11Questions: 5Answers: 0
Hy im trying to show a value datetime '2017-01-01 12:00:00.000' and the datatable show this '/Date(1483297200000)/'
how can I set the column type/format?
//////code//////
columns: [
{
"data": "Id", "visible": true,
render: function (data, type, row) {
//alert(type);
if (type === 'display') {
return row.Id + ' <input type="hidden" id="Id" name="Id" value="' + row.Id + '">'
}
// return data;
}
},
{ "data": "User", "visible": true },
{ "data": "Date", "visible": true }, //probelm here
{ "data": "Type1", "visible": true },
{ "data": "ContactName", "visible": true },
{ "data": "LastUpdate", "visible": true },//here too
{ "data": "AssigTo", "visible": true },
{ "data": "AssigDate", "visible": true },
{ "data": "Priority", "visible": true },
{ "data": "Status", "visible": true },
{ "data": "Done", "visible": true }
]
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Try using moment.js in columndefs section:
@bsuk Thank you!
also can be solved like this i you dont wanna use de momnet.js