And that would give you a result that is right 99% of the time. Is 99% correct acceptable to your users? What will you do for the 1% of the time that it's not correct?
If that's an auto-enter calc and your users are OK with manually fixing the date on the rare times when it is wrong, then so far so good.
If not, then you will need a calculation that is correct 100% of the time. There is a KB article that computes the number of weekdays between two dates, but what you need for that would be actually simpler, A case function can add a different number of days when the initial date falls on Sunday and yet another value when the date falls on Saturday.
Let ( [ d = YourTable::Initialdate ;
dw = DayOrWeek ( d ) ];
Case ( dw = 1 ; d + 5 // d is on Sunday, compute date for next Friday
dw = 7 ; d + 6 // d is on Saturday, compute date for next Friday
d + 7 // all other days of week, add 7 to compute same day of week, next week
Thanks Phil :)
You've assisted me so much within the last 6 months, I'm starting to kinda-sorta think like you :) But I have a lonnnnnnnnnnnnnng way to go.
I started working on the dow Case calc yesterday but didn't get a chance to finish before I left work.
When I wrote my example down on paper, it hit me like a bolt of lightning that M-F = next week's M-F for adding 5 business days.
As always, Thanks Phil!!!