Functions (all)

EstimatedAgeAt

Function Name:
EstimatedAgeAt
Description:
Uses available information to estimate a person’s age at a given date.

This function will return negative values if the date happened before the person was born (or might have happened then). It will take no notice of a person’s death, and if the date comes after their actual death date it will return the age that the person would have been if they had never died, .

Minimum FH Version:
3.1
No. of Parameters:
4
Return Type:
Number
Parameter 1:
A reference to a record.
Parameter 2:
A date. The date for which you want to know the person’s age.
Parameter 3:
This parameter can be used to modify the behaviour of the function.
MIN
The person’s youngest possible age at the date in question.
MAX
The person’s oldest possible age at the date in question.
AVG
The value midway between MIN and MAX.
Parameter 4:
A number. This is an optional parameter. If not supplied, the value will default to ‘2’.

In order to estimate a person’s age at a given date, this function has to estimate when that person was born (if this is not known). This parameter affects the number of generations that will be checked to try to find a date that could help estimate the person’s birth date.

Family Historian will use any dates it can in a person’s record for preference. If it doesn’t find any, it will normally check parents and children’s dates, and try to calculate birth dates from these. If still no luck, it will normally check grandparents, and grandchildren’s dates. How many generations up or down it will continue to check, if closer generations have no dates to work from, depends on the value set here. If you set this to a high value (e.g. 10) some individuals who previously had no estimated birth date (because nothing to go on), may now have an estimate.

The higher the value used, the more results returned you can expect. But the range between the EARLIEST and LATEST values in these cases is likely to be large, and the function may run slower. You can set this value to 0 if you want fewer, more accurate results.

Examples:

=EstimatedAgeAt(%INDI%, Today(), MIN)

or

=EstimatedAgeAt(%INDI%, DateAt(1901), MAX)

The former estimates the minimum age that the person could be today (note that the Today’ function is used to pass this date parameter). The latter uses the DateAt function to estimate the person’s maximum possible age in 1901.