Create a new Date object with a date string from json data, and then use the methods of the objects to get the desired date formats.
var dateObject = new Date("2011-03-13T11:30:00Z"); var time = dateObject.getHours() + ':' + dateObject.getMinutes();
You also have the following that you could use to create your date
dateObject.getDay(); // would return 0 for Sunday (days run 0-6 starting at Sun) dateObject.getMonth(); // would return 2 for March (months run 0-11) dateObject.getFullYear(); // return 2011
According to the comments, in order to fix this for time zones, you need to know that the Z in your line means UTC/GMT , so if you are not in this time zone, you need to correct your difference in UTC
For example, replace Z with +05:30 5.5 hours earlier than UTC
var dateString = "2011-03-13T11:30:00Z".replace('Z', '+05:30'); var dateObject = new Date(dateString);
source share