Forum Discussion
Difference in Hours Calculation for Duration - Negative +1 day
- 5 years ago
You can add a custom column with the formula below. It checks if the Out is less than the In and, if so, it sums the time between Out and midnight and In and midnight. This is in minutes so you can sub with Duration.TotalHours or just divide the result by 60.
= if [In] <= [Out] then Duration.TotalMinutes([Out] - [In]) else Duration.TotalMinutes(#time(24,0,0) - [In]) + Duration.TotalMinutes([Out] - #time(0,0,0))
Regards,
Pat
You can add a custom column with the formula below. It checks if the Out is less than the In and, if so, it sums the time between Out and midnight and In and midnight. This is in minutes so you can sub with Duration.TotalHours or just divide the result by 60.
= if [In] <= [Out] then Duration.TotalMinutes([Out] - [In]) else Duration.TotalMinutes(#time(24,0,0) - [In]) + Duration.TotalMinutes([Out] - #time(0,0,0))
Regards,
Pat
- Anonymous5 years agoNot applicable
mahoneypat- That works great