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 5816 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

How do I compute a child's age in months?

I have two DATE fields to compute the age from,

child_dob and school_date

both are 4-digit dates. I am not sure if I should use a Calculation field or scripting logic. Thanks in advance for advice.

Posted

Try:


12 * ( Year ( EndDate ) - Year ( StartDate ) ) + Month ( EndDate ) - Month ( StartDate )

- ( Day ( EndDate ) < Day ( StartDate ) )




This assumes that a person becomes a month older on the same day-in-month as his birthday or when the month ends - whichever happens first.





Alternatively, you could just do a rough estimate based on the length of average month:





Div ( EndDate - StartDate ; 30.436875 ) 

Posted

Hi Comment ... I gave the second suggestion a try and it's perfect.

The first suggestion simplifies what I've been seeing from other sources - it will be a good exercise for me to learn syntax.

As always, THANK YOU! :laugh2:

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