Date Calculation

Sharon Hague

Registered User.
Local time
Today, 12:19
Joined
Jul 10, 2003
Messages
138
Hi All

I have a subform which displays all employee names etc and holidays taken.

I have an employment yr and current year text box with their formats set as "yyyy"

When I try to subtract 1 from the other it comes up with the incorrect figues.

Our holiday entitlement is 20 days which we received an extra day for each year of employment, however this is only up to 25 days in total.

I want to be able to calculate the holiday entitlement for that employee based on the employment date and current date.

Can anybody help?
 
Entitlement = 20 + IIf(DateDiff("yyyy", [StartDate], Date()) > 5, 5, DateDiff("yyyy", [StartDate], Date()))
 
Mile-O-Phile

Good to hear from you, thanks for your reply so quick.

It's worked a treat.

Cheers
 

Users who are viewing this thread

Back
Top Bottom