AnsweredAssumed Answered

Arcade Expression: Yesterday's Date

Question asked by PointIDS on Nov 6, 2018
Latest reply on Nov 6, 2018 by ahoque-esristaff



I am currently attempting to create an expression that will stylize points based on date. The aim is to turn all points that were created either yesterday or today one color and then all other dates a different color. I have successfully created an  expression that will accomplish this for today's date, but cannot figure out how to also include yesterday's date.


Current expression;

Iif( Day(Now()) == Day($feature.EditDate), "True", "False")


As there is not a function for "Yesterday" I assume one would need to use the DateAdd Function?


Thanks for your help!