I have this code:
CODE JS:
var completeD = start.format("YYYY/MM/DD HH:mm");
var dt = new Date(completeD);
console.log(dt) //here it's display Tue Feb 09 2016 02:00:00 GMT+0200 (EET)
console.log(dt.getHours() + ":" + dt.getMinutes()); //the input value is 2:0
The input value is 2:0
and should be 02:00
How can I add a 0 in front ...?if it's neccesarry.
Thanks in advance!