javascript - Split Date Wed Jan 27 2016 02:14:05 GMT+0200 (GTB Standard Time) -
i have date (wed jan 27 2016 02:14:05 gmt+0200 (gtb standard time) , want split in order take hours (02:14:05). how can that?
thank you
var date = new date('wed jan 27 2016 02:14:05 gmt+0200 (gtb standard time)'); var time = ('0' + date.gethours()).slice(-2) + ':' + ('0' + date.getminutes()).slice(-2) + ':' + ('0' + date.getseconds()).slice(-2); console.log(time);
Comments
Post a Comment