This works becauseExcel times are fractional values of days.
The formula in D5, copied down, is:
This works becauseExcel dates are just serial numbers.
These values are only for reference, and are not used in any subsequent calculations.
The IFS function is new in Excel 2019.
Use the IFS function to evaluate multiple conditions without multiple nested IF statements.
More than one condition can be tested by nesting IF functions.