How can I write an arcade expression that would change the symbology of a webmap based on whether or not a date is equal to or before today's date?
Solved! Go to Solution.
Hi, you can do something like this:
var event_time = $feature.eventTime;
var today_date = Today();
var diff = DateDiff(today_date, event_time, 'days');
if(diff > 0){
return 'before today';
}else(diff <0)
return 'today';
Hi, you can do something like this:
var event_time = $feature.eventTime;
var today_date = Today();
var diff = DateDiff(today_date, event_time, 'days');
if(diff > 0){
return 'before today';
}else(diff <0)
return 'today';
Thank you so much Donald Shaw. This is extremely helpful!