I'm working on tweaking this formula:
Solved: Excluding weekends using DateDiff and Datepicker - Power Platform Community (microsoft.com)
So it excludes Sundays from two dates. I'm currently using this:
Set(varAdd14Days, DateAdd(selectedDate, 14, TimeUnit.Days));
Set(varCalculateAmtOfDays, RoundDown(DateDiff(selectedDate, varAdd14Days, TimeUnit.Days) / 7, 0) * 5 +
Mod(5 + Weekday(varAdd14Days) - Weekday(selectedDate), 5));
Set(varActualReturnDate, DateAdd(selectedDate, varCalculateAmtOfDays, TimeUnit.Days));
It's for a loan service. A user will book an item, they get it for 14 days, then have to return it. At the moment this formula is (apparently) excluding weekends, whereas I only want it to exclude Sundays.
The final line of the above, will show the return date to the user.
Need to exclude Sundays.