AGE AT formatting in Queries
Posted: 22 Apr 2022 10:38
I have a query, one of the uses of which is checking for missing census records for individuals. It uses the expression %INDI.CENS[year=1841].AGE% to return the individuals age at the census.
I want to export this query as a csv file to use in an Excel spreadsheet and want the age as a simple numeric value, however, when I enter the age in the Fact "Age" field in the Property Box it displays in the format "51 yrs" ( I am only entering age in years ). This format is also applied in the query.
I have tested using the "=LeftText" function, which works, but needs to be combined with "=TextLen" to deal with single digit ages below 10 and three digit ages above 99.
Is there a simpler way of formatting this to just show the numeric age without the " yrs" suffix?
I want to export this query as a csv file to use in an Excel spreadsheet and want the age as a simple numeric value, however, when I enter the age in the Fact "Age" field in the Property Box it displays in the format "51 yrs" ( I am only entering age in years ). This format is also applied in the query.
I have tested using the "=LeftText" function, which works, but needs to be combined with "=TextLen" to deal with single digit ages below 10 and three digit ages above 99.
Is there a simpler way of formatting this to just show the numeric age without the " yrs" suffix?