<?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: How do you select a specific date with Arcade? in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/how-do-you-select-a-specific-date-with-arcade/m-p/1184829#M46554</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/2839"&gt;@KenBuja&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That worked.&amp;nbsp; Thank you very much.&lt;/P&gt;</description>
    <pubDate>Tue, 21 Jun 2022 19:36:18 GMT</pubDate>
    <dc:creator>AdamGebhart</dc:creator>
    <dc:date>2022-06-21T19:36:18Z</dc:date>
    <item>
      <title>How do you select a specific date with Arcade?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-do-you-select-a-specific-date-with-arcade/m-p/1184805#M46551</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1108"&gt;@XanderBakker&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Xander:&lt;/P&gt;&lt;P&gt;You've been my go-to person for all things Arcade.&amp;nbsp; Is there any chance you can help me here?&lt;/P&gt;&lt;P&gt;I have a field (StatusDate, type = date) that needs to be displayed in a popup.&amp;nbsp; When that date is 12/31/22 I want to ignore the value and leave it blank.&amp;nbsp; All other values will be shown.&lt;/P&gt;&lt;P&gt;I have tried these expressions and they do NOT ignore the 12/31/22 values.&lt;/P&gt;&lt;P&gt;1) IIF(Find(12/31/22,$feature.StatusDate) &amp;gt; -1, "", $feature.StatusDate)&lt;/P&gt;&lt;P&gt;2) IIF(Find('12/31/22',$feature.StatusDate) &amp;gt; -1, "", $feature.StatusDate)&lt;/P&gt;&lt;P&gt;3) IIF($feature.StatusDate == 12/31/22,"", $feature.StatusDate)&lt;/P&gt;&lt;P&gt;4) IIF($feature.StatusDate == '12/31/22',"", "$feature.StatusDate")&lt;/P&gt;&lt;P&gt;In the feature class I only see the date value in the format above.&amp;nbsp; When I open the attributes via AGO I see "12/31/22, 6:00 PM".&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you, or anyone else for that matter, help?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2022 19:03:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-do-you-select-a-specific-date-with-arcade/m-p/1184805#M46551</guid>
      <dc:creator>AdamGebhart</dc:creator>
      <dc:date>2022-06-21T19:03:22Z</dc:date>
    </item>
    <item>
      <title>Re: How do you select a specific date with Arcade?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-do-you-select-a-specific-date-with-arcade/m-p/1184818#M46553</link>
      <description>&lt;P&gt;This is one calculation that works:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;IIF($feature.LASTUPDATE &amp;gt; Date(2022,11,31) &amp;amp;&amp;amp; $feature.LASTUPDATE &amp;lt; Date(2023,0,1), " ", $feature.LASTUPDATE);  //month is zero-based&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2022 19:29:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-do-you-select-a-specific-date-with-arcade/m-p/1184818#M46553</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2022-06-21T19:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: How do you select a specific date with Arcade?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-do-you-select-a-specific-date-with-arcade/m-p/1184829#M46554</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/2839"&gt;@KenBuja&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That worked.&amp;nbsp; Thank you very much.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2022 19:36:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-do-you-select-a-specific-date-with-arcade/m-p/1184829#M46554</guid>
      <dc:creator>AdamGebhart</dc:creator>
      <dc:date>2022-06-21T19:36:18Z</dc:date>
    </item>
    <item>
      <title>Re: How do you select a specific date with Arcade?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-do-you-select-a-specific-date-with-arcade/m-p/1184844#M46556</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/15176"&gt;@AdamGebhart&lt;/a&gt;&amp;nbsp;, I am glad that&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/2839"&gt;@KenBuja&lt;/a&gt;&amp;nbsp;shared a good solution.&lt;/P&gt;&lt;P&gt;Apart from the solution provided by Ken, there are many ways to do this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can compare by exact date and time (probably the date has a time like 6 pm since it is stored as UTC date time and there is a difference between your local time zone and UTC):&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;if ($feature.StatusDate == Date(2022, 11, 31, 18, 0, 0)) { ... }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another way (when the time does not matter) is to translate it to text and compare it as a string:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;if (Text($feature.StatusDate, "M/D/YY") == "12/31/22") { ... }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2022 20:27:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-do-you-select-a-specific-date-with-arcade/m-p/1184844#M46556</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2022-06-21T20:27:27Z</dc:date>
    </item>
    <item>
      <title>Re: How do you select a specific date with Arcade?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-do-you-select-a-specific-date-with-arcade/m-p/1184849#M46557</link>
      <description>&lt;P&gt;Those worked too.&amp;nbsp; Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2022 20:35:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-do-you-select-a-specific-date-with-arcade/m-p/1184849#M46557</guid>
      <dc:creator>AdamGebhart</dc:creator>
      <dc:date>2022-06-21T20:35:22Z</dc:date>
    </item>
  </channel>
</rss>

