Untitled fiddle
JavaScript
function getDate(mss) {
const date = new Date(mss);
const day = String(date.getDate()).padStart(2, '0');
const month = String(date.getMonth() + 1).padStart(2, '0');
const year = date.getFullYear();
const hours = String(date.getHours()).padStart(2, '0');
const minutes = String(date.getMinutes()).padStart(2, '0');
return `${month}/${day}/${year} ${hours}:${minutes}`;
}
const time1 = 1775775240000
const time2 = 1775767380000
let t = time1 - time2
console.log(getDate(time1))
console.log(getDate(time2))
console.log(t/ (1000 * 60 * 60))