Year Ranges

Year Ranges

From
Facebook
Status
Done
Share

Range

lets( yr, prop("Date").year(), ifs( yr.test("1851|1900"), yr, yr >= 1800 && yr <= 1850, "1800–1850", yr >= 1901 && yr <= 1950, "1901–1950", yr >= 1951 && yr <= 2000, "1951–2000", yr >= 2001 && yr <= 2050, "2001–2050" ) )
Old Explanation
if(test(year(prop("Date")), "1851|1900"), format(year(prop("Date"))),
If the year from Date exists in the pipe-separated list, simply display that year.
if(year(prop("Date")) >= #### and year(prop("Date")) <= ####, "####–####",
Otherwise, for each range, check to see if the year from Date is greater than or equal to the first number and less than or equal to the second number. If so, display that range as a result.
 
By Ben  •  Latest  •  Was this helpful? Please consider buying me a coffee. Cheers!By Ben  •  Latest  •  Was this helpful? Please consider buying me a coffee. Cheers!
By BenLatest • Was this helpful? Please consider buying me a coffee. Cheers!