I have an ajax method where i request for a C# object that contains a DateTime. My javascript-console shows that i get the date in the following format:
$.ajax({
type: "GET",
url: getDateTestUrl,
dataType: "json",,
success: function (response) {
console.log(response.datetest);
}
});
Result:
/Date(1454513400000)/
How do I make this into a javascript date? I tried to use both New Date()
and Date.parse()
Example form the javascript-console:
Date.parse('/Date(1454513400000)/');
NaN
new Date('/Date(1454513400000)/')
Invalid Date