I believe I am missing something obvious here. When I request a JSON response from an OData service I get a different result for the DateTime properties than I do when I req
If this may help, I was facing the same problem and I ended to implement something like this, not so elegant but it works.
String.prototype.DateWCF = function(dateformat) {
return new Date(parseInt(this.match(/\/Date\(([0-9]+)(?:.*)\)\//)[1])).format(dateformat);
};
then on $.ajax
success:
success: function(data) {
$.each(data, function() {
var hello = this.DateTimeProperty.DateWCF('dd-MM-yyyy'));
});
}
I hope this may be helpful.
Using date.js script.Try below
new Date(parseInt(yourDateValue)).toString("ffffd, dd-MMM-yyyy, hh:mm:ss")