1
Good evening, I’m working with Ajax
to return a json
containing a data in the format Datetime
but I’m getting in string format /Date(1519339100637)/
. How can I convert to date and time format 23/02/2018 12:00:00:
Ajax function:
<script type="text/javascript">
function GetData(andamento_id) {
var $tbl = $('#tbl');
$.ajax({
url: 'Andamento.aspx/GetComentarioAndamento',
data: "{'AndamentoID':'" + andamento_id + "'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
type: "POST",
success: function (data) {
debugger;
if (data.d.length > 0) {
for (var i = 0; i < data.d.length; i++) {
$tbl.append('<tr><td>' + data.d[i].ComentarioTexto
+ '</td><td>' + data.d[i].DataHoraComentario
+ '</td><td>'
+ "<div class='row centered'><div class='user-block'><img src='"
+ data.d[i].FotoProfile + "' data-toggle='tooltip' title='"
+ data.d[i].NomeAdvogado + "' class='img-circle img-bordered-sm'></div></div>"
+ '</td></tr>');
}
}
}
});
}
</script>
It’s always noon, 12:00?
– Sam
@dvd is not an example 00:00:00
– Evandro
I get it... the day and time are on the number.
– Sam
And how is the C# that sends the JSON?
– Woss
@dvd Worked perfectly thank you!
– Evandro