Hello,
I wish to utilize the Filter function in Arcade to only return results between 1/1/2019 and 12/31/2019. I understand the Filter function is Filter(featurerSet, filter) where filter is an SQL text string. The features are stored with a Date/Time field. I am just not understanding the proper SQL commands for working with Date/Time.
Any help or direction to more resources is appreciated.
I tagged you Xander Bakker because I (a non-programmer) have learned much about Arcade following your numerous examples and help to others on GeoNet.
Thanks.
Kevin
Solved! Go to Solution.
Hi k.brown ;
It seems that the expression below works (the same format as you would use in Desktop):
var sql = "LASTUPDATE BETWEEN date '01/01/2019' and date '12/31/2019'";
var fs = Filter($layer, sql);
return Count(fs);
Hi k.brown ;
It seems that the expression below works (the same format as you would use in Desktop):
var sql = "LASTUPDATE BETWEEN date '01/01/2019' and date '12/31/2019'";
var fs = Filter($layer, sql);
return Count(fs);
Perfect! This worked for me.
Thank you very much for your quick response. As I stated, I do not have much coding experience but following along with your examples is very helpful.
Much appreciated.
KB
Hi https://community.esri.com/people/k.brown,
I'm glad it worked!