seconds_end="5200" let hour_end = Math.floor(seconds_end / 3600) >= 10 ? Math.floor(seconds_end / 3600) : '0' + Math.floor(seconds_end / 3600); seconds_end -= 3600 * hour_end; let min_end = Math.floor(seconds_end / 60) >= 10 ? Math.floor(seconds_end / 60) : '0' + Math.floor(seconds_end / 60); seconds_end -= 60 * min_end; let sec_end = seconds_end >= 10 ? seconds_end : '0' + seconds_end; console.log(hour_end + ':' + min_end + ':' + sec_end)