Page 1 of 1

Formating census age to ignore literal "yrs"

Posted: 28 Apr 2023 10:13
by Medows
Hi,
I am using FH 7.0.20.

I am trying to build a matrix of UK census dates so that uner each census I can see the persons age. This shows me missing census entries and also any possible errors if the age does go up or down 10 years +/-1.

The expression I am using is ...
%INDI.CENS[year=1901].AGE%,

The output of this is...
1841 1851 1861 1871...
47 yrs 56 yrs 67 yrs 75 yrs


I would prefer to drop off the literal " yrs" and just have the year number.

Is this possible?


Regards,
Alan

Re: Formating census age to ignore literal "yrs"

Posted: 28 Apr 2023 10:47
by tatewise
Yes, use =LeftText( %INDI.CENS[year=1901].AGE%, 2, "" )
But beware that if the Age is 9 months or 9 days you won't be able to tell.

Re: Formating census age to ignore literal "yrs"

Posted: 29 Apr 2023 13:05
by Medows
Thanks Mike. It will suffice because I am really using this for 1841 to 1911 as99% time it is round years unlike 1921 census.