New Age calculation in FileMaker Pro
I have a student database which incorporates an age field, calculating a student's age on today's date. The calculation for this is:
Year (Get ( CurrentDate )) - Year (Date of Birth) - If (Get ( CurrentDate ) < Date (Month (Date of Birth); Day (Date of Birth); Year (Get ( CurrentDate ))); 1; 0)
I wish to set up a second age calculation which will let me see at a glance how old my students will be on any particular date in the future (or how old they were on a date in the past!) – for example, their age on the first day of the next academic year. I've set up a field called 'VariableDate' to input any chosen date.
What calculation would I need for this?
Use the same expression as above, but substitute the VariableDate field in place of Get ( CurrentDate ).