I am trying to filter a feature set using a date field on ArcGIS Online. I need the filter to return a feature set of all records after a particular day. However, when I run the filter, I simply get back my starting feature set. In other words, it runs but it doesn't seem to be recognizing the filter expression that I've entered.
In the code below I'm creating two feature sets, one on line 4 and the other on line 5. Line 4 produces the feature set that I'd expect, but it's the filter on line 5 where I'm trying to get all records that have a date after the inspection date that doesn't seem to be working.
Is there additional formatting that I need to do to my inspectionDate variable to get it to evaluate correctly against my DATE field?
var inspectionDate = $feature.DATE
var client = $feature.CLIENT
var meter = $feature["SERIAL__"]
var fSetByMeter = OrderBy(Filter($layer, 'CLIENT = @client AND SERIAL__ = @meter'), 'DATE ASC');
var fSetCurrentDate = OrderBy(Filter(fSetByMeter, 'DATE > @inspectionDate'), 'DATE ASC')
return fSetCurrentDate