<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Displaying symbology dynamically based on date Expression Builder in ArcGIS Dashboards Questions</title>
    <link>https://community.esri.com/t5/arcgis-dashboards-questions/displaying-symbology-dynamically-based-on-date/m-p/1665607#M11615</link>
    <description>&lt;P&gt;Thank you, that worked.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 13 Nov 2025 19:17:02 GMT</pubDate>
    <dc:creator>OmoOyaks</dc:creator>
    <dc:date>2025-11-13T19:17:02Z</dc:date>
    <item>
      <title>Displaying symbology dynamically based on date Expression Builder</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/displaying-symbology-dynamically-based-on-date/m-p/1665585#M11613</link>
      <description>&lt;P&gt;I am fairly new to Arcade and having trouble understanding why the symbology expression builder to display the date attribute isn't working. I created an Arcade expression to display attributes based on their expiry date attribute.&lt;/P&gt;&lt;P&gt;Feature name - Defib, Feature attribute - Expdate&lt;BR /&gt;It does seem to display the different if cases, but the dates displayed are all wrong.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, a map feature is displayed as expired but the actual expiry date is in 7 months. The date format is mm/dd/yyyy&lt;/P&gt;&lt;P&gt;See attached expression, I am at a loss what the problem is.&lt;/P&gt;&lt;P&gt;----------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;if (DateDiff(Now(), Date($feature.Expdate), 'days') &amp;lt;= 0) {&lt;BR /&gt;return "Expired" }&lt;BR /&gt;else if (DateDiff(Now(), Date($feature.Expdate), 'days') &amp;lt;= 30) {&lt;BR /&gt;return "Expires within 30 days" }&lt;BR /&gt;else if (DateDiff(Now(), Date($feature.Expdate), 'days') &amp;gt; 30 &amp;amp;&amp;amp;&lt;BR /&gt;DateDiff(Now(), Date($feature.Expdate), 'days') &amp;lt; 100) {&lt;BR /&gt;return "Expires between 30 to 100 days" }&lt;BR /&gt;else if (DateDiff(Now(), Date($feature.Expdate), 'days') &amp;gt;= 100) {&lt;BR /&gt;return "Expires in more than 100 days" }&lt;BR /&gt;else {&lt;BR /&gt;return "Expiry Date Unavaliable" }&lt;/P&gt;</description>
      <pubDate>Thu, 13 Nov 2025 18:16:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/displaying-symbology-dynamically-based-on-date/m-p/1665585#M11613</guid>
      <dc:creator>OmoOyaks</dc:creator>
      <dc:date>2025-11-13T18:16:58Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying symbology dynamically based on date Expression Builder</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/displaying-symbology-dynamically-based-on-date/m-p/1665596#M11614</link>
      <description>&lt;P&gt;You have the order of the DateDiff parameters reversed if the ExpDate is in the future. For those dates, your expression returns a negative number.&lt;/P&gt;&lt;P&gt;Here's an easier way to write your expression, using the When function. This assumes that the ExpDate field is a date field.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;if (IsEmpty($feature.Expdate) return "Expiry Date Unavailable"
var diff = DateDiff($feature.Expdate, Now(), "days");
When(diff &amp;lt;= 0, "Expired",
     diff &amp;lt;= 30, "Expires within 30 days",
     diff &amp;lt; 100, "Expires between 30 to 100 days",
     "Expires in more than 100 days"
);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Nov 2025 18:48:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/displaying-symbology-dynamically-based-on-date/m-p/1665596#M11614</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2025-11-13T18:48:15Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying symbology dynamically based on date Expression Builder</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/displaying-symbology-dynamically-based-on-date/m-p/1665607#M11615</link>
      <description>&lt;P&gt;Thank you, that worked.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Nov 2025 19:17:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/displaying-symbology-dynamically-based-on-date/m-p/1665607#M11615</guid>
      <dc:creator>OmoOyaks</dc:creator>
      <dc:date>2025-11-13T19:17:02Z</dc:date>
    </item>
  </channel>
</rss>

