How To Add Business Days To A Date In Power Apps (Excludes Weekends)

How To Add Business Days To A Date In Power Apps (Excludes Weekends)



Summary

This Power Apps formula will take a start date and then add a number of weekdays to it. Weekend days (Saturday, Sunday) are excluded from the calculation.



Example


Inputs

StartDateWednesday, January 13, 2021
AddDays4


Code

With(
    {
        varStartDate: Date(2021, 1, 13),
        varAddWeekdays: 4
    },
    DateAdd(
        varStartDate,
        Value(varAddWeekdays) + RoundDown(
            (Weekday(
                varStartDate,
                Monday
            ) + Value(varAddWeekdays) - 1) / 5,
            0
        ) * 2,
        Days
    )
)


Result

Tuesday, January 19, 2021