0
The return of the Dt_start field returned from the Database is correct: 26/08/2019 11:08:10
But not in javascript is like this: /Date(1566916268000)/
, see:
$.each(response.listar, function (index, item) {
console.log("item.Dt_Inicio: " + item.Dt_Inicio); <-- /Date(1566916268000)/
});
I tried to make this conversion but it doesn’t work:
var _dt = new Date(item.Dt_Inicio.toLocaleString());
var dd = _dt.getDate();
var mm = _dt.getMonth() + 1;
var yyyy = _dt.getFullYear();
console.log("item.Dt_Inicio: " + dd + "/" + mm + "/" + yyyy);
NaN/NaN/NaN
on your console.log is returning exactly "Date(1566916268000)"? or is returning only the number "1566916268000"?
– Leonardo Getulio
Hello! @Leonardo Getulio on my console returns /Date(1566916268000)/, but I found the solution as indicated on the top of the post, thank you very much!
– hard123