I'm using a formula field in a Request Time Off form to determine how many work days a person will miss if their request is approved. This part of the formula works fine using the workDaysBetween function.
However, I want to determine how many regular team meetings a person will miss, and these team meetings only happen on Mon, Wed, and Fri (three times a week). I cannot figure out how to sum ONLY M/W/F weekdays. If necessary I can put in a custom function but I'd like to do it in a formula field if at all possible.
The current expression is below:
if(weekday(input.Start_Date) == 2 || 4 || 6, input.Start_Date.workDaysBetween(input.End_Date) + 1, input.Start_Date.workDaysBetween(input.End_Date))
Examples:
Gone Mon-Wed should return "2" since the person will miss 1 Monday + 1 Wednesday.
Currently this returns "3", because the formula is counting Tuesday
Gone Mon-Fri should return 3, currently this returns "5"
Gone Fri - Fri of the following week should return 4. This returns "6"
Can anybody help please?