I have this time value
2000-01-01T10:00:00.000Z
How do i convert it in javascript to only return the time
10:00
If you strip off the training ".000Z" then you can use Moment JS:
var m = moment('2000-01-01T10:00:00', moment.ISO_8601);
m.format('HH:mm'); // 10:00
You can use following.
var k = new Date("2000-01-01T10:00:00.000Z");
alert(k.getUTCHours() + ":" + k.getUTCMinutes());
Using pure javascript, create date object with new Date() then use getUTCHours() and getUTCMinutes()
var date = new Date("2000-01-01T10:00:00.000Z");
var hour = date.getUTCHours()();
var minutes = date.getUTCMinutes();
var time = hour + ":" + minutes;