<?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: Arcade Expression For Selecting Future Dates in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-for-selecting-future-dates/m-p/1143535#M44355</link>
    <description>&lt;P&gt;Ah. In that case:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;go to the layer's style settings&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohannesLindner_1-1644828124623.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/33821i600F9CE23C0CF10C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohannesLindner_1-1644828124623.png" alt="JohannesLindner_1-1644828124623.png" /&gt;&lt;/span&gt;&lt;/LI&gt;&lt;LI&gt;Choose "New Expression" as symbol field&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohannesLindner_2-1644828221502.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/33822i20CDE58C1FB7C667/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohannesLindner_2-1644828221502.png" alt="JohannesLindner_2-1644828221502.png" /&gt;&lt;/span&gt;&lt;/LI&gt;&lt;LI&gt;edit and use this expression (it will return true or false):&lt;/LI&gt;&lt;/UL&gt;&lt;LI-CODE lang="javascript"&gt;var start_date = Today()
var end_date = DateAdd(Today(), 5, "days")
var test_date = $feature.DateField

return test_date &amp;gt;= start_date &amp;amp;&amp;amp; test_date &amp;lt;= end_date&lt;/LI-CODE&gt;&lt;UL&gt;&lt;LI&gt;&amp;nbsp;Choose "Distinct Values" as styling option&lt;/LI&gt;&lt;LI&gt;Style the symbols for true and false&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohannesLindner_3-1644828672667.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/33823iA535A110F79A636C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohannesLindner_3-1644828672667.png" alt="JohannesLindner_3-1644828672667.png" /&gt;&lt;/span&gt;&lt;/LI&gt;&lt;LI&gt;You can also hide the false features by setting the transparency to 100%.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Before:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohannesLindner_0-1644828065361.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/33820iB8690C6D173ED0FA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohannesLindner_0-1644828065361.png" alt="JohannesLindner_0-1644828065361.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After applying the Arcade expression:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohannesLindner_4-1644828879232.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/33824i1C25F2AE134AD953/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohannesLindner_4-1644828879232.png" alt="JohannesLindner_4-1644828879232.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After hiding the false features:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohannesLindner_5-1644828931087.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/33825i28B82EA6F6BAFDDD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohannesLindner_5-1644828931087.png" alt="JohannesLindner_5-1644828931087.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note that this approach will probably be slower than just filtering out the undesired features from the layer (see HuubZwart's answer).&lt;/P&gt;</description>
    <pubDate>Mon, 14 Feb 2022 09:00:04 GMT</pubDate>
    <dc:creator>JohannesLindner</dc:creator>
    <dc:date>2022-02-14T09:00:04Z</dc:date>
    <item>
      <title>Arcade Expression For Selecting Future Dates</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-for-selecting-future-dates/m-p/1142989#M44313</link>
      <description>&lt;P&gt;Hi there, does anyone have a method of filtering a layer that shows features containing a date field which are within the next 'x' days. I know that there is already a date filter which can filter features within the last 'x' days but not within the next.&lt;/P&gt;&lt;P&gt;For example the layer has a field containing future dates and I would like only features to be selected by this field if it is within x days of todays date.&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;ID&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;Fruit&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;Date&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;1&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;Apple&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;13/02/2022&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;2&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;Pear&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;14/02/2022&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be much appreciated&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Feb 2022 10:20:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-for-selecting-future-dates/m-p/1142989#M44313</guid>
      <dc:creator>map16jamie</dc:creator>
      <dc:date>2022-02-11T10:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression For Selecting Future Dates</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-for-selecting-future-dates/m-p/1143015#M44316</link>
      <description>&lt;LI-CODE lang="javascript"&gt;var start_date = Text(Today(), "Y-MM-DD")   // Today: 2022-02-11
var end_date = Text(DateAdd(Today(), 5, "days"), "Y-MM-DD")  // Today +5 days: 2022-02-16 

var fs = FeatureSetBy*(...)
var future_records = Filter(fs, "DateField BETWEEN @start_date and @end_date")&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Feb 2022 12:18:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-for-selecting-future-dates/m-p/1143015#M44316</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2022-02-11T12:18:00Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression For Selecting Future Dates</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-for-selecting-future-dates/m-p/1143022#M44317</link>
      <description>&lt;P&gt;Hi Johannes,&lt;/P&gt;&lt;P&gt;Thank you for your reply, I forgot to mention I was trying to do this in Mapviewer. I tried the expression above but the function 'Filter' cannot be used within the symbology.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Feb 2022 13:15:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-for-selecting-future-dates/m-p/1143022#M44317</guid>
      <dc:creator>map16jamie</dc:creator>
      <dc:date>2022-02-11T13:15:14Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression For Selecting Future Dates</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-for-selecting-future-dates/m-p/1143156#M44325</link>
      <description>&lt;P&gt;I don't think this is possible using the regular layer filter in the webmap, but you can tweak the definition expression for the required layer in the web map using ArcGIS Online Assistant (or update the web map via REST interface). You can use any supported SQL statement here such as&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="sql"&gt;DateField BETWEEN CURRENT_DATE() AND CURRENT_DATE() + x&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Be aware this makes it impossible to further edit the expression in the webmap interface, you will get an error there if you try to.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Feb 2022 17:28:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-for-selecting-future-dates/m-p/1143156#M44325</guid>
      <dc:creator>HuubZwart</dc:creator>
      <dc:date>2022-02-11T17:28:07Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression For Selecting Future Dates</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-for-selecting-future-dates/m-p/1143535#M44355</link>
      <description>&lt;P&gt;Ah. In that case:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;go to the layer's style settings&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohannesLindner_1-1644828124623.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/33821i600F9CE23C0CF10C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohannesLindner_1-1644828124623.png" alt="JohannesLindner_1-1644828124623.png" /&gt;&lt;/span&gt;&lt;/LI&gt;&lt;LI&gt;Choose "New Expression" as symbol field&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohannesLindner_2-1644828221502.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/33822i20CDE58C1FB7C667/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohannesLindner_2-1644828221502.png" alt="JohannesLindner_2-1644828221502.png" /&gt;&lt;/span&gt;&lt;/LI&gt;&lt;LI&gt;edit and use this expression (it will return true or false):&lt;/LI&gt;&lt;/UL&gt;&lt;LI-CODE lang="javascript"&gt;var start_date = Today()
var end_date = DateAdd(Today(), 5, "days")
var test_date = $feature.DateField

return test_date &amp;gt;= start_date &amp;amp;&amp;amp; test_date &amp;lt;= end_date&lt;/LI-CODE&gt;&lt;UL&gt;&lt;LI&gt;&amp;nbsp;Choose "Distinct Values" as styling option&lt;/LI&gt;&lt;LI&gt;Style the symbols for true and false&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohannesLindner_3-1644828672667.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/33823iA535A110F79A636C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohannesLindner_3-1644828672667.png" alt="JohannesLindner_3-1644828672667.png" /&gt;&lt;/span&gt;&lt;/LI&gt;&lt;LI&gt;You can also hide the false features by setting the transparency to 100%.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Before:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohannesLindner_0-1644828065361.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/33820iB8690C6D173ED0FA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohannesLindner_0-1644828065361.png" alt="JohannesLindner_0-1644828065361.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After applying the Arcade expression:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohannesLindner_4-1644828879232.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/33824i1C25F2AE134AD953/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohannesLindner_4-1644828879232.png" alt="JohannesLindner_4-1644828879232.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After hiding the false features:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohannesLindner_5-1644828931087.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/33825i28B82EA6F6BAFDDD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohannesLindner_5-1644828931087.png" alt="JohannesLindner_5-1644828931087.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note that this approach will probably be slower than just filtering out the undesired features from the layer (see HuubZwart's answer).&lt;/P&gt;</description>
      <pubDate>Mon, 14 Feb 2022 09:00:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-for-selecting-future-dates/m-p/1143535#M44355</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2022-02-14T09:00:04Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression For Selecting Future Dates</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-for-selecting-future-dates/m-p/1143555#M44356</link>
      <description>&lt;P&gt;Thank you HubbZwart, This has worked &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Feb 2022 12:26:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-for-selecting-future-dates/m-p/1143555#M44356</guid>
      <dc:creator>map16jamie</dc:creator>
      <dc:date>2022-02-14T12:26:31Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression For Selecting Future Dates</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-for-selecting-future-dates/m-p/1143556#M44357</link>
      <description>&lt;P&gt;Thank you Johannes!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Feb 2022 12:26:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-for-selecting-future-dates/m-p/1143556#M44357</guid>
      <dc:creator>map16jamie</dc:creator>
      <dc:date>2022-02-14T12:26:58Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression For Selecting Future Dates</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-for-selecting-future-dates/m-p/1143993#M44380</link>
      <description>&lt;P&gt;Hi HuubZwart,&lt;/P&gt;&lt;P&gt;Thank you for this. Having tried this it works when viewing on Mapviewer but when trying to load this map on Field Maps it does not load the layer at all. Does this method work on Field Maps?&lt;/P&gt;</description>
      <pubDate>Tue, 15 Feb 2022 10:55:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-for-selecting-future-dates/m-p/1143993#M44380</guid>
      <dc:creator>map16jamie</dc:creator>
      <dc:date>2022-02-15T10:55:56Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression For Selecting Future Dates</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-for-selecting-future-dates/m-p/1216372#M48076</link>
      <description>&lt;P&gt;It helped me a lot. Thanks.&lt;/P&gt;&lt;P class="lia-align-right" data-unlink="true"&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&lt;A href="https://fireboyand-watergirl.io" target="_self"&gt;&lt;FONT color="#FFFFFF"&gt;fireboy and watergirl&lt;/FONT&gt;&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2022 04:16:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-for-selecting-future-dates/m-p/1216372#M48076</guid>
      <dc:creator>skunkpup</dc:creator>
      <dc:date>2022-09-27T04:16:11Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression For Selecting Future Dates</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-for-selecting-future-dates/m-p/1667938#M67184</link>
      <description>&lt;P&gt;Loking for a while for this. Thanks&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;FONT size="2" color="#FFFFFF"&gt;&amp;nbsp;&lt;A href="https://lucky-dayscasino.com" target="_self"&gt;Lucky Days Casino&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Nov 2025 18:05:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-for-selecting-future-dates/m-p/1667938#M67184</guid>
      <dc:creator>AudreyDawson</dc:creator>
      <dc:date>2025-11-21T18:05:14Z</dc:date>
    </item>
  </channel>
</rss>

