Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5153 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have a personell management file that keep track of school faculty and staff. I have a field on the form called hire date. I have another field called years of service that show how many years the member has been with the school. I want that years of service field to relate to the hire date and automatically update the number of years of service so i dont have to do so manually. How do I go about doing so?

Thanks For The Help!!

Erik

Posted

Your Years Of Service field should be a calculation (result is date) as:

Let ( [

now = Get ( CurrentDate ) ;

this = Date ( Month ( HireDate ) ; Day ( HireDate ) ; Year ( now ) )

] ;

Year ( now ) - Year ( HireDate ) - ( now < this )

) // END LET

When you create this calculation (and you are still in the calculation dialog, go into Storage Options and select the checkbox 'do not store calculation results.' This is required so the calculation updates every time it is accessed.

Posted (edited)

Thank you but I think it was that my mind slipped. :blush2:

BTW, someone could also use Ray's trickery calc for the test whether full year has lapsed, which is if IIRC:

Month ( now ) + Day ( now ) / 100 < Month ( HireDate ) + Day ( HireDate ) [color:red]/ 100

Edited by Guest
forgot red

This topic is 5153 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.