When my user selects a "target start date" for a contract task, I want to add the number of "allowable days" to that date. (That value comes from a text field populated with a number, which varies based on a dropdown menu listing the types of contracts they can work on.) This calculated date should appear in a "target completion date" field. Where I'm getting stuck is that the "allowable days" for the task must only be counting business days (Monday-Friday).
Here are the names of my fields:
Allow.Row1.Cell // text field that will populate with a specific number of days based on a dropdown menu selection.
Dates.Row1.TARGETSTART // date field
Dates.Row1.TARGETEND // date field
This is the code I had that works but does include weekends. I want to exclude weekends.
if(HasValue(Dates.Row1.TARGETSTART)) then
Num2Date( (Date2Num(Dates.Row1.TARGETSTART.formattedValue, "MM-DD-YYYY") + Allow.Row1.Cell), "MM-DD-YYYY") + 1
I searched through the discussion boards and can't find anything that I've been able to edit properly to fit my situation! Any help would be greatly appreciated.