# Hello everyone, I am trying to create a formula to track the vacation time of my employees..

• 0
• Question
• Updated 4 years ago
• Answered

Hours available are dependent on time worked here. (40 hours after year 1, 80 hours for years 2-4, and 120 hours for 5 years and beyond.) The following is what I have and it isn't working.. This is my first attempt and any help would be appreciated! What am I doing wrong??

If ([Hire Date]+Days(365)=Days(5)) or ([Hire Date]+days(730)=days(10)) or ([Hire Date]+days(1095)=days(10)) or ([Hire Date]+days(1460)=days(10)) or ([Hire Date]+days(1825)=days(15))

• 0 Points

Posted 4 years ago

• 0

dwhawe, Champion

• 908 Points
Your description is based on years workd and hours of vacation rather than dyas worked and days of vacation so my suggestion is based on your description. b This would be a formula - numeric field.  I can't figure out how to single line so this would be single line breaks rather than the double as shown.  With QuickBase and If statements, as soon as it finds a TRUE, it returns that value and stops.

If(

Today()>AdjustYear([Hire Date],5),120,

Today()>AdjustYear([Hire Date],2),80,

Today()>AdjustYear([Hire Date],1),40,

0)

• 0 Points
Thank you!!
• 0 Points
Will this reset at the anniversary of hiring date?

dwhawe, Champion

• 908 Points
Yes.  Today() returns the current date so it is comparing the current date you are viewing the record to the anniversary date.