calculating vacation
This is killing me. I'm developing a vacation-tracking system, and I need to
calculate vacation based on anniversary date. Everything over 1 year is easy
(Select Case). But less than a year it gets tricky.
If they've been here less than six months, they accrue no vacation.
They start accruing at a rate of 1.54 hours per pay period beginning at 180
days, and can use vacation in advance - so we need to know the amount of
vacation available through the end of the year.
(Day(Now)-Day(HireDate)/7*1.54?)
But if their 6-month-anniversary was before January 1, then they accrue at
the normal rate.
And vacation does not carry over from year to year.
Thanks in advance.
--
Adios,
Clay Harryman
|