I have a timestamp in the following format:
[yyyy-MM-ddThh:mm:ssZ] (example: 2015-05-15T03:34:17Z)
I want's to parse this timestamp into Date and format is like: [Fri May 15 2015 09:04:17 GMT +5:30]:
Now, i am use the following code to parse and it work's fine in Firefox 3.6+ browsers. But the problem is, it's not working in internet explorer (IE) 8, in IE it returns 'NaN'.
My Javascript code is:
var myDate = new Date(timestampDate);
//In Firefox i get myDate as Date object and i can get day, month and year. But in IE this myDate value is coming as NaN
var day = myDate.getDate();
var month = myDate.getMonth();
var year = myDate.getFullYear();
Any help is rewarded. Please give me a solution to make this working in IE also.