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:
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);
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?
- The topic ‘Return time in minutes’ is closed to new replies.