This is the form I'm using:
Where the start date is DateValue5 (january, 1, 2023) and the end date is DateValue6 (january, 6, 2023).
I want to calculate the number of working days as per this Microsoft Power Apps blog post.
Thus:
RoundDown(
DateDiff(DateValue5.SelectedDate, DateValue6.SelectedDate, Days) / 7, 0) * 5 +
Mod(5 + Weekday(DateValue6.SelectedDate) - Weekday(DateValue5.SelectedDate), 5)
Should return 5.
But it is returning 0, which is obviously wrong.
Can anyone help?

Report
All responses (
Answers (