Our suggestion was to make use of the SelectedDays() expression function.
This takes 3 parameters:
1 First Date
2 Second Date
3 The 7 digit string of bits representing the days Monday to Sunday, in that order. So, "1111111" would be every day and "1111100" would just be weekdays and "0000011" would be just weekends.
As an example, this would return the number of weekdays between these two dates:
SelectedDays(20240708,20241208,"1111100")
This example below would give you the number of Mondays:
SelectedDays(20240708,20240720,"1000000")
The user concerned was using date variables rather than date literals but the expression would still give the required result, using the pattern of "1111100"