I'm looking for an Arcade expression to symbolise a feature layer in a web map based how many days left there is until my target date field (Target_Dat), compared to Today's date, so hopefully the symbology will keep changing live.
I'm looking for if the target date is before today's date, then it will be "overdue". If it's within 30 days, it will be "nearly due", and anything in more than 30 days time will be "on schedule"
Would appreciate any help please
Solved! Go to Solution.
This will return the outputs
var days = DateDiff($feature.Target_Dat, Today(), 'days');
return when (days > 30, "on schedule",
days >= 0, "nearly due",
"overdue");
This will return the outputs
var days = DateDiff($feature.Target_Dat, Today(), 'days');
return when (days > 30, "on schedule",
days >= 0, "nearly due",
"overdue");
Amazing, thank you so much! I kept getting an error with my code so I think I need to do a lot more practice with it