72
rated 0 times
[
78]
[
6]
/ answers: 1 / hits: 22746
/ 8 Years ago, wed, february 17, 2016, 12:00:00
How can I convert a decimal hour value like 1.6578 to hh:mm:ss in jquery or javascript?
I only managed to do it to hh:mm using this code:
var decimaltime= 1.6578;
var hrs = parseInt(Number(decimaltime));
var min = Math.round((Number(decimaltime)-hrs) * 60);
var clocktime = hrs+':'+min;
More From » jquery