I'm using the following function to add X amount of business days (TxtSLACalc.Text) to a date. It counts business days correctly to a point (it skips weekends in the middle) however if the resulting end date is on a Saturday or Sunday it shows that instead of the following Monday or the preceding friday? What adjustment to this calculation do I need to make?
DateAdd(
DPAssignedDate.SelectedDate,
Value(TxtSLACalc.Text) + 2 * If(
(Weekday(
DPAssignedDate.SelectedDate,
StartOfWeek.Monday
) + Value(TxtSLACalc.Text)) > 5,
RoundDown(
(Value(TxtSLACalc.Text) - (5-Weekday(
DPAssignedDate.SelectedDate,
StartOfWeek.Monday
))) / 5,
0
)
)
)

Report
All responses (
Answers (