I have a point feature that identifies locations to be inspected that month. The feature has a "Due Date" attribute, which is typically the last day of the month.
I'd like to symbolize, in Field Maps, any point that has not been completed, based on the due date; so, I attempted to write the below arcade expression which looks at today's date, compares it to the month of the features due date attribute, and if the due date is the same month as Today(), then symbolize it as "Due This Month". If the due date is last month, symbolize it as "Past Due":
var DateDifference = DateDiff(Today(), Month($feature["due_date"]), "month")
if (DateDifference < 1){
return 'Due This Month'
}
else {
return 'Past Due'
}
The expression, however, doesn't appear to work... everything regardless of the due date (even if the due date is the end of this month) is being symbolized as "Past Due".
Any guidance would be appreciated. I'm a novice w/ arcade expressions.