Return time in minutes
-
Hi. I have this info on this page working correctly: https://wordpress.org/support/topic/how-to-calculate-time-difference-hhmm/
I’m using the second formula:
(function(){
var date1 = new Date(fieldname1*86400000),
date2 = new Date(fieldname2*86400000),
s = ABS(date1-date2)/1000,
h = FLOOR(s/3600);
m = FLOOR((s%3600)/60);
return h+’:’+m;
})()The time is returned in hours and minutes, and I need the time returned just in minutes. Can you suggest an edit to the formula that will show total minutes?
Thanks!
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Return time in minutes’ is closed to new replies.