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

Recommended Posts

Posted

Does anyone have a good calcualtion or solution for determining a persons age by comparing currentDate with a field containing the persons date of birth. Seems like a simple solution that I can't seem to make work.

Posted

How do you want the age displayed, Papabjoe?

Year number only, year number with "years old", Year and Days? How will it need to be formatted?

Posted

You could create a calculation field with a calculation like this:

Year(Get(CurrentDate)) - Year(dateofbirth) - (Get(CurrentDate) < Date(Month(dateofbirth); Day(dateofbirth); Year(Get(CurrentDate))))

I found the above calc a long time ago somewhere on this forum. Since then it has worked fine for me.

Posted

I think this one should work better:

Case(Day(Get(CurrentDate)) =Day(dateofbirth) and Month(Get(CurrentDate)) ≥ Month(dateofbirth);Year(Get(CurrentDate)) - Year(dateofbirth);Year(Get(CurrentDate)) - Year(dateofbirth) - (Get(CurrentDate) < Date(Month(dateofbirth); Day(dateofbirth); Year(Get(CurrentDate)))))

Posted

Both produce the same results. It just depends how convoluted of a calculation you want to use. :wink2: Note that the second half of your calculation is all that is necessary since (Get(CurrentDate) < Date( Month(dob); Day(dob); Year(Get(CurrentDate)) )) will return 0 when the current date is greater than or equal to the birthdate for the current year, so nothing will be subtracted.

Posted

These are all great, I've already inserted one and it's working just great. I always seem to get stuck in one particular line of thought until I hit a brick wall. Usually these posts remind me of something I forgot and then suddenly it all becomes clear.

Thanks for your help.

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