This function will do the trick. Takes two arguments: a date and the number of days to add (or subtract if negative)
workday = function({one_date, add_days}, {local new_date, dow},
new_date = date increment(one_date, "Day", add_days);
dow = day of week(new_date);
if (dow == 7, // Saturday
new_date = date increment(new_date, "Day", 2);
,
dow == 1, // Sunday
new_date = date increment(new_date, "Day", 1);
);
new_date;
);
testdate = informat("3/22/2019", "m/d/y");
workday(testdate, 2);
Output from the log:
25Mar2019