How can I convert SQL smalldatetime
or datetime
like this:
select cast(getdate() as smalldatetime)
To JSON format like this:
/Date(1576278000000+0100)/
How can I convert SQL smalldatetime
or datetime
like this:
select cast(getdate() as smalldatetime)
To JSON format like this:
/Date(1576278000000+0100)/
I just find this post in another issue like you got it. Maybe it would work for you
"render": function ( data, type, row ) {
var fecha = new Date(parseInt(data.match(/\d+/)[0]));
return fecha.getMonth() + 1 + '/' + fecha.getDate() + '/' + fecha.getFullYear();;
},
"targets": 0
and this is the link that I found https://es.stackoverflow.com/questions/125686/convertir-fecha-en-javascript