Hi, I am struggling to find a formula that works across multiple scenarios trying to calculate the time between two date/time columns. For each formula I have tried, it works on some, but not others. Below are screen shots of the results and formulas used.
What I actually need is to calculate work hours between two date/time columns. Examples below.
The number of work hours between Jan. 3, 1:30pm and Jan. 3, 3:00pm should be 1.5 hours. In the picture below, that result is correct. However, the time between Jan. 3, 3:00pm and Jan. 5 10:00am should be 12 hours, but the result is 15.33. Formula in use for this example is,
DAYS({Resolved On},{Reported On}) * 8 + 1
If I use this formula, the results are a little different.
(((HOUR({Resolved On})*60+MINUTE({Resolved On}))-(HOUR({Reported On})*60+MINUTE({Reported On})))/60)+((DAY({Resolved On})-DAY({Resolved On}))*24)
I’ve tried using workdays and get similar results. Results where one is accurate and others are not. What am I missing here?
I got to this formula, which works for everything that does NOT span a weekend day.
((WORKDAYS({Resolved On},{Reported On}) -1 ) * 8) + (HOUR({Resolved On}) - HOUR({Reported On})) +
(MINUTE({Resolved On}) - MINUTE({Reported On})/60)