Hi,
We have a requirement to calculate the time difference in hours between two dates to exclude weekends, issues arise with corner cases, such as when the start date falls on a weekend and the end date falls on a weekday, or when the start date is on a weekday and the end date is on a weekend. In these scenarios, the calculation is overridden.
Note: The full weekend exclusion is working as expected, but partial weekend exclusions are not functioning correctly.
|
| Start Date | | End Date | | TimeDifference(Hours) | | Actual TimeDiff(Hours) | |
|---|
|
| 09/09/2023 1:22:46 AM | | 09/11/2023 1:28:28 AM | | 0.10 | | 1.47 | |
|
| 09/23/2023 2:39:32 AM | | 09/25/2023 2:24:31 AM | | 0.25 | | 2.41 | |
|
| 10/25/24 4:53:56 PM | | 10/26/24 5:08:20 PM | | 23.77 | | 7.10 | |
|
| 12/9/22 5:59:19 PM | | 12/10/22 5:16:47 PM | | 24.72 | | 6.01 | |