I have inspection dates to symbolize my locations. I was using the expression below and it works fine, but now I need to add another variable.
IIf(DateDiff(now(), $feature.dateauditperformed, 'years') < 1, "Inspected","2/3 Year")
Now I want those locations inspected within the last year = Current, >1 and <=2 years = Second Year, and everything else = Third year.
This is what I've been trying to work with. All I seem to get is "other".
var year = DateDiff(Now(), $feature.dateauditperformed,'years');
if (year <= 1) return 'Current';
else if (year > 1 && year <= 2) return 'Second Year';
else return 'Third Year';
end