I need to calculate duration between two dates (with time) in my fact table. However there is a specific date&time, which I want to exclude in calculation e.g. 1:30AM Saturday - 4:30PM Monday. For example:
| ID | StartDate | EndDate | Duration |
|---|---|---|---|
| 1 | 12/1/2020 4:00PM | 12/4/2020 9:04AM | 2.71 |
| 2 | 11/29/2020 11:48AM | 12/1/2020 9:53AM | 0.72 |
| 3 | 11/30/2020 10:36AM | 12/1/2020 2:06PM | 0.9 |
| 4 | 12/2/2020 6:56AM | 12/3/2020 2:36PM | 1.32 |
I am not really sure how to solve this so I'll be grateful for help.