Forum Discussion

Re: How to calculate the number of hours between date/time fields, excluding weekends

If you just want this to be a formula Duration field type, then make that change and convert it to a Duration like this :

Hours(

Max(0,
Round($HoursBeforeStartEndAdjustment 
- Max(0,ToHours(ToTimeOfDay($StartDateTimeBounded) - $DayStartTime)) 
- Max(0,ToHours($DayEndTime - ToTimeOfDay($EndDateTimeBounded)))
, Max(0,ToHours(ToTimeOfDay($OnHoldStartDateTimeBounded) - $DayStartTime)) 
- Max(0,ToHours($DayEndTime - ToTimeOfDay($OnHoldStopDateTimeBounded)))),0.1)

)



------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------
No RepliesBe the first to reply