Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

I already have the calculation for age but I want the calculation to appear in months instead of years so that I can figure out Vacation Time. Example:

Current Date = field 1

Date of Hire = field 2

Total Months = field 3 (Calculation that I can't figure out)

Vacation = field 4 (calculation = vacation *.875) in months

Thanks in advance for all your help

Posted

Try this:

Case(

not IsEmpty(Current Date) and not IsEmpty(Date of Hire) and (Current Date >= Date of Hire) ;

12 * (Year(Current Date) - Year(Date of Hire) - ( Current Date < Date( Month(Date of Hire) ; Day(Date of Hire) ; Year(Current Date) ) ) ) + (Mod( Month(Current Date) - Month(Date of Hire) + 12 - ( Day(Current Date) < Day(Date of Hire) ) ; 12 ) )

)

Posted

Ralph,

I tried it and when I put in the current date of 06/01/2000, it comes up 47 months. That is about 6 months short. There has to be a way. I copied exactly the calcuation and pasted it into the field and that's what I got.

Posted

I get 55 months with the calculation copied from the post and pasted into FMP. 6/1/2000 to 1/1/2001 is 7 months. 1/1/2001 to 1/1/2005 is 4 years = 48 months. 48 + 7 = 55.

6/1/2000 is Date of Hire & Current Date is 1/19/2005.

Posted

I must have something else wrong then. I keep coming up with 47 with the exact same script. Like I said, I cut and pasted it into the field and that is what I get. Will look at it again.

Posted

That is what I was using also but when I put in the field to show up the current date is was 8 months. I deleted the field and put it back in and it is now working perfectly. I guess that it was just some sort of bug. Not sure what was going on with this as it has happened before with other dates. Thanks Ralph. Your calculation did work in the first place. I should have checked into this first.

Posted

Have you set the current date to be unstored? It needs to be unstored or it will remain at the date the record was created.

This topic is 7316 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.