Hello,
I'm wanting to use an IF statement symbolize and add another field for Fiscal Year. What I'm trying to do is code that new 'Fiscal Year' field based on a range of dates from an existing date field. Below is what I have, though it is returning all 'N/A' values, so the logical '&&' operator doesn't appear to be selecting the dates properly. I will say too that I'm a novice at programming, so there may be a stupidly easy syntax solution for this, and I will be humbly grateful if there is one!
if ($feature.Projected_Date_to_Open >= 7/1/2019 && $feature.Projected_Date_to_Open <= 6/30/2020){
return 'FY 19/20';
} else if ($feature.Projected_Date_to_Open >= 7/1/2020 && $feature.Projected_Date_to_Open <= 6/30/2021) {
return 'FY 20/21';
} else if ($feature.Projected_Date_to_Open >= 7/1/2021 && $feature.Projected_Date_to_Open <= 6/30/2022) {
return 'FY 21/22';
} else {
return 'N/A';
}