* Formating census age to ignore literal "yrs"

Questions regarding use of any Version of Family Historian. Please ensure you have set your Version of Family Historian in your Profile. If your question fits in one of these subject-specific sub-forums, please ask it there.
Post Reply
avatar
Medows
Gold
Posts: 16
Joined: 16 May 2016 12:28
Family Historian: V7

Formating census age to ignore literal "yrs"

Post by Medows » 28 Apr 2023 10:13

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

User avatar
tatewise
Megastar
Posts: 27078
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Formating census age to ignore literal "yrs"

Post by tatewise » 28 Apr 2023 10:47

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.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
Medows
Gold
Posts: 16
Joined: 16 May 2016 12:28
Family Historian: V7

Re: Formating census age to ignore literal "yrs"

Post by Medows » 29 Apr 2023 13:05

Thanks Mike. It will suffice because I am really using this for 1841 to 1911 as99% time it is round years unlike 1921 census.

Post Reply