I have start dates with times and end dates with times tracking when work was entered into a status and when it was completed. I'd like to know how many working hours were spent doing the task.
For example:
| Start Date | End Date | Working Hours (Time Spent between 9 AM - 5 PM) |
|---|---|---|
| 8/1/2022 10:03 AM | 8/5/2022 4:43 PM | ? |
| 8/8/2022 9:03 AM | 8/10/2022 3:34 PM | ? |
| 8/10/2022 11:13 AM | 8/15/2022 4:57 PM | ? |
I'd like to know how many hours were spent working between 9 AM and 5 PM, excluding weekends and public holidays.
How can I do this calculation in Google Sheets?

