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

Recommended Posts

Posted

Hello,

I searched the forum but cannot find any notes on how to calculate a person's age based on his/her birthdate. I also cannot find this in any of the documentation I have which is surprising as I thought this particular calculation would be very commonly used. How would I do this?

Thanks!

rlbryant

Posted

What previous post?

It is helpful to Post the URL to whatever post you are referring to.

Lee

Posted

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

Posted

That one doesn't work if you were born between the first and twenty-eighth of February during a non-leap year and today is your birthday.

Posted

Ralph: Please provide one or more counterexamples to the function I gave, if you can, so we can all learn.

Posted

I have this equation and it does work, when you are typing in for the frist time... But I have noticed that the age does not change when a birthday passes. Have I done something wrong?

Joseph

Posted

The calculation needs to be "Unstored".

That is an option provide in the Calculation Window (at least it was in v6 and before).

Lee cool.gif

Posted

Ok, I went into the calc, under storage options and marked do not store anything... But the age did not change? How do I go back through the data base and refresh all for the age?

Thank you for the help,

Joseph

Posted

Joseph, is your field a date field, number field or calculation? I think you have it set to either a date type field or a number, then you are putting that calculation in the "auto-enter" area. Change the field type to a calculation.

Posted

At the bottom there is a menu that defaults to number. Change it to Date and see that does it for you.

Posted

The answer is a truncated 2 digit age -- like 71... it is generated by this equation:

Case(IsEmpty(Ins_DOB);"";Truncate((Current_Date-Ins_DOB)/365.25;0))

Any idea's?

Joseph

Posted

Use the calc I posted already. It is more accurate and no truncating is necessary.

Posted

Ok, so I now am using your equation Queue:

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

On my form this is a calc and a number... Does this mean that the age will increase when his birthday passes?

Thank you for the help

Joseph

  • Newbies
Posted

How do I calculate Age from a Date of Birth field and a Date of Death field - ie not using current date

  • Newbies
Posted

Hi, I am trying to work with the code that is being given here and I haven't had success in making it work.

I have a field that calculates the equation that was given by the user Queue

but I cannot modify the field when I create a record so I do not know how I am suppose to pass a date in order for the calculation to render the number for age.

The field which type is Calculation has the equation:

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

Calculation result is number

The above is not working.

I've also tried to make the field type number, with the Auto Enter Calculate checked which to I then place the equation which allows me to modify the field, but then the calculation is wrong.

Any ideas?

Posted

DOB is the Date of Birth field. Once you fill that in, there is no need to pass a date since it naturally passes itself. Calculation fields are not intended to be modified, nor is there any reason to do so in this case.

Make sure the calculation is unstored in Storage Options (select 'Do not store calculation results') or the field will not update when the date on your system changes.

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