Forum Discussion
Calculate total working hours between date/time excluding weekends and break time
- Jul 15, 2024
I attached the wrong version, sorry.
The 2 hours in the first example is because the 1st of May is in the holiday list. If you remove that date from the holiday list, you get 3 hours.
See the attached version.
As variant to HansVogelaar 's solution, I've created a formula assuming a couple of things.
I would like to understand the purpose or logic behind this calculation but this is how I structured it based on your definition of the problem: I assumed the start date and the end date could have different start and end times as the official ones. But not the dates in between.
That is, if we are analyzing from 07/12/2024 to 07/16/2024, my formula will take into account how many worked hours are within each of these exact two dates (could be 4 hours on 07/12 and 6:30 hours on 07/16) by looking at your specified entries. However, the calculated hours in the workdays in between which, in this case would be 07/15/2024, will always be 8:00.
A bit of a messy formula but if my logic was slightly going in the right direction it could also serve. Not a very accurate understanding of how working hours are calculated or revised, but it could be useful to you.
- VladLockhartJul 15, 2024Copper Contributor
Martin_Angosto hi thanks for replying, I changed the input into these but still got the wrong result