Date.parseWeird = Date.prototype.parseWeird = function (d) {
return new Date(parseInt(d.replace(/[^\-\d]/g, ""), 10));
};
var newDate = Date.parseWeird("\/Date(1317847200000-0400)\/");
document.write(newDate);
This returns me Thu Oct 06 2011 02:10:00 GMT+0530 (India Standard Time)
I want to extract this 02:10:00 and convert this into time like this 9:30 P.M or A.M
Can’t you just try something like this?
http://jsfiddle.net/wXvzt/