I'm trying to filter out events in my Feature Layer by dates. I am doing this in the ArcGIS Online Map Viewer Style expressions. It works otherwise fine, but this script won't show events that are happening today as Active:
var start = $feature.start;
var end = $feature.end;
var today = Now();
var event = When(
end >= today && start <= today, 'Active', 'Upcoming'
);
return event;
The dates are in Esri Datetime format:
start = 10/18/2023 3:00 am.
end = 10/18/2023 3:00 am.
It also doesn't show event that start today and end another day:
start = 10/18/2023 3:00 am.
end = 10/19/2023 3:00 am.