I am trying to get a table data using ajax call in ASP.NET MVC, I am getting data but column which has Date
datatype is showing a value like /Date(1489257000000)/.
How to convert this in date format?
This is code of my ajax call:
$('document').ready(function () {
LoadData();
});
function LoadData() {
$.ajax({
url: "/Order/List",
type: "GET",
contentType: "application/json;charset=utf-8",
dataType: "json",
success: function (result) {
var html = '';
//var date = new Date(parseInt(jsonDate.substr(6)));
$.each(result, function (key, item) {
html += '<tr>';
html += '<td>' + item.OrderNo + '</td>';
html += '<td>' + item.NoOfItems + '</td>';
html += '<td>' + item.TotalPrice + '</td>';
html += '<td>' + item.SubmittedOn + '</td>';
html += '<td> <a href="#" onclick="return getbyID(' + item.OrderId + ')">Edit</a> | <a href="#" onclick = "Delele(' + item.OrderId + ')">Delete</a></td>';
html += '</tr>';
});
$('.tbody').html(html);
},
error: function (errormessage) {
alert(errormessage.responseText);
}
});
}