J
jsniemi79
Guest
Using your 25567 days, the code below will convert that to milliseconds, add it to the milliseconds since 1/1/70 and then convert the total to days, using normal rounding. It comes up with 42389 after rounding. There might be an easier way to do this, but this should get you what you are looking for if I understand your issue. var d = new Date(); var n = d.getTime(); var daysTo1900 = 25567; var msBetween00And70 = 25567 * 24 * 60 * 60000; var combinedMs = n + msBetween00And70; var convertToDays = combinedMs / 60000 / 60 / 24; var roundedDays = Math.round(convertToDays); return roundedDays;
Continue reading...
Continue reading...