Select to view content in your preferred language

Display features based on dates using ArcGIS Arcade

134
2
Jump to solution
Monday
Labels (2)
BrandonPrice1
Occasional Contributor

How can I display features based on dates using ArcGIS Arcade? For example, no dates that exist in the future. Only starting from the current date or prior. This should be possible with a style expression correct?

 

BrandonPrice1_0-1719275855396.png

 

This is the live csv: https://cwwp2.dot.ca.gov/data/d7/lcs/lcsStatusD07.csv (the fields to be used would be the closureStartDate and closureEndDate)

0 Kudos
1 Solution

Accepted Solutions
jcarlson
MVP Esteemed Contributor

Yes, you can do that. You'd want an expression like:

return Iif(
  DateDiff(Today(), $feature.yourDateField) >= 0,
  'Past/Present',
  'Future'
)

Then simply leave the "Future" category out of your symbology, or set it to be completely transparent.

- Josh Carlson
Kendall County GIS

View solution in original post

2 Replies
jcarlson
MVP Esteemed Contributor

Yes, you can do that. You'd want an expression like:

return Iif(
  DateDiff(Today(), $feature.yourDateField) >= 0,
  'Past/Present',
  'Future'
)

Then simply leave the "Future" category out of your symbology, or set it to be completely transparent.

- Josh Carlson
Kendall County GIS
BrandonPrice1
Occasional Contributor

Thank you! This works nicely.

0 Kudos