Page 1 of 1
Life Dates
Posted: 01 Jan 2020 12:36
by ColinH
I am displaying Life Dates in a Descendents chart. Is it possible to add the age at death as well so that it would display, for example, 1909-1982 - 73yrs
Thanks
Re: Life Dates
Posted: 01 Jan 2020 13:40
by tatewise
Presumably you have the standard Life Dates item in your Text Scheme.
In the Edit Text Scheme dialogue select the Life Dates item on right and click Edit button.
Change the Template to =LifeDates(,STD) - %INDI.DEAT.AGE%
That assumes you are entering Age in the Death event for most people.
If that is not the case, then the age will have to be calculated, which is more complex.
Let me know how accurately you want the calculation to be.
=LifeDates(,STD) - =AgeAt(%INDI%,%INDI.DEAT.DATE%)yrs will often work, but for child deaths it will say 0yrs.
A bit more experimentation yields the following Template that shows the actual Death Age if it exists.
But otherwise shows the age at estimated death derived from Death/Burial/Cremation Date if that exists.
=LifeDates(,STD) - =CombineText(,%INDI.DEAT.AGE%,,CombineText(,AgeAt(%INDI%,EstimatedDeathDate(%INDI%,MID,2))," yrs",))
Re: Life Dates
Posted: 02 Jan 2020 23:11
by sheekom
Hi,
I wonder if you can help me. I am trying to show current age in text box based on birth year and system year. In case the person is passed, the age should be calculated as (Death year-Birth Year). Can you please help me with the code for this calculation in text box. I am using FH6.2.7.
Thanks in Advance
Re: Life Dates
Posted: 03 Jan 2020 00:44
by tatewise
Welcome to the FHUG.
The calculation expression depends on how you want to cope with people with no Birth Date.
If you do not want age to be shown if there is no actual Birth Date then use:
=AgeAt( %INDI%, <date> )
If you want an estimated age to be shown when no actual Birth Date then use:
=EstimatedAgeAt( %INDI%, <date>, AVG, 2 )
In both cases the <date> is calculated using:
DateIf( NullDate(EstimatedDeathDate(%INDI%,MID,2)), Today(), EstimatedDeathDate(%INDI%,MID,2) )
i.e. If there is no estimated Death Date available, then use Today's date, else use the estimated Death Date.
So the two options are:
=AgeAt(%INDI%,DateIf(NullDate(EstimatedDeathDate(%INDI%,MID,2)),Today(),EstimatedDeathDate(%INDI%,MID,2)))
or
=EstimatedAgeAt(%INDI%,DateIf(NullDate(EstimatedDeathDate(%INDI%,MID,2)),Today(),EstimatedDeathDate(%INDI%,MID,2)),AVG,2)
Note that if there are actual Birth/Baptism/Christening dates &/or actual Death/Burial/Cremation dates then the estimations use those actual dates, otherwise they are estimated from the dates of close relatives.