Hi, apologies if this has been covered but i can't find any details on the forums. Also a bit of a bumbling newbie, so aplogies if this is inconcise
I want to calculate the last date payable on a staff termination form I have designed. The calculation should be last day worked (entered by calendar) & an additional field detailing the annual leave owing, which should then calculate the final date payable. There is an additional complication that the calculation should ignore weekends. Is this possible?
Ie last date worked Friday 16 Sep
6 days annual leave
= last day payable of Monday 26 Sept.
Any thoughts?
One way to do it would be beginning with the date of the last day worked, and then counting up day by day. You have a day counter which you increase only if the day of the week is a working day (date.getDay() is your firend). When you have reached the number of annual leave days, you have the date of the last payable day…
Hope this can help.
Max Wyss.