<?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>idea Map Viewer - Dynamic Date Filter Based on Current Date Unit, Eg. Current Year in ArcGIS Online Ideas</title>
    <link>https://community.esri.com/t5/arcgis-online-ideas/map-viewer-dynamic-date-filter-based-on-current/idi-p/1617769</link>
    <description>&lt;P&gt;In Map Viewer, there is currently no option to set a date filter based on the current calendar date.&lt;/P&gt;&lt;P&gt;Say for example you have a live data feed of earthquake locations and want a map that shows all earthquakes from only&amp;nbsp;&lt;EM&gt;this&lt;/EM&gt; year. It would be nice if a filter condition existed like 'is in current &lt;EM&gt;date_unit&lt;/EM&gt;' . I.e., a filter could be setup like [earthquake_date] is in current '&lt;EM&gt;year'&lt;/EM&gt;, where 'year' is dynamic and changes with the system date. This way, the date filter on the webmap never has to be updated at the start of each calendar year.&lt;/P&gt;&lt;P&gt;Another example - say police want to show a map of car accidents that have occurred &lt;EM&gt;this&lt;/EM&gt; month. They could set a filter on the web map like [accident_date] is in current 'month'. Whenever the calendar month changes, the date filter automatically updates to show accidents in the current month. On the first day of the month the map would have no features to display, but the feature count would steadily increase as the month progresses.&amp;nbsp;&lt;/P&gt;&lt;P&gt;These are the current date conditions available, and there is no option to filter based on current year. The 'in the last' and 'not in the last' options are close, but they don't allow filtering based on the current calendar date unit.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mwartman_grey_0-1747943271293.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/133078iB589F306792E0034/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mwartman_grey_0-1747943271293.png" alt="mwartman_grey_0-1747943271293.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Related:&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-online-questions/dynamic-date-filter-to-show-current-year-only/m-p/1617684#M64857" target="_self"&gt;https://community.esri.com/t5/arcgis-online-questions/dynamic-date-filter-to-show-current-year-only/m-p/1617684#M64857&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 22 May 2025 20:23:02 GMT</pubDate>
    <dc:creator>mwartman_grey</dc:creator>
    <dc:date>2025-05-22T20:23:02Z</dc:date>
    <item>
      <title>Map Viewer - Dynamic Date Filter Based on Current Date Unit, Eg. Current Year</title>
      <link>https://community.esri.com/t5/arcgis-online-ideas/map-viewer-dynamic-date-filter-based-on-current/idi-p/1617769</link>
      <description>&lt;P&gt;In Map Viewer, there is currently no option to set a date filter based on the current calendar date.&lt;/P&gt;&lt;P&gt;Say for example you have a live data feed of earthquake locations and want a map that shows all earthquakes from only&amp;nbsp;&lt;EM&gt;this&lt;/EM&gt; year. It would be nice if a filter condition existed like 'is in current &lt;EM&gt;date_unit&lt;/EM&gt;' . I.e., a filter could be setup like [earthquake_date] is in current '&lt;EM&gt;year'&lt;/EM&gt;, where 'year' is dynamic and changes with the system date. This way, the date filter on the webmap never has to be updated at the start of each calendar year.&lt;/P&gt;&lt;P&gt;Another example - say police want to show a map of car accidents that have occurred &lt;EM&gt;this&lt;/EM&gt; month. They could set a filter on the web map like [accident_date] is in current 'month'. Whenever the calendar month changes, the date filter automatically updates to show accidents in the current month. On the first day of the month the map would have no features to display, but the feature count would steadily increase as the month progresses.&amp;nbsp;&lt;/P&gt;&lt;P&gt;These are the current date conditions available, and there is no option to filter based on current year. The 'in the last' and 'not in the last' options are close, but they don't allow filtering based on the current calendar date unit.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mwartman_grey_0-1747943271293.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/133078iB589F306792E0034/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mwartman_grey_0-1747943271293.png" alt="mwartman_grey_0-1747943271293.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Related:&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-online-questions/dynamic-date-filter-to-show-current-year-only/m-p/1617684#M64857" target="_self"&gt;https://community.esri.com/t5/arcgis-online-questions/dynamic-date-filter-to-show-current-year-only/m-p/1617684#M64857&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 May 2025 20:23:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-ideas/map-viewer-dynamic-date-filter-based-on-current/idi-p/1617769</guid>
      <dc:creator>mwartman_grey</dc:creator>
      <dc:date>2025-05-22T20:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: Map Viewer - Dynamic Date Filter Based on Current Date Unit, Eg. Current Year</title>
      <link>https://community.esri.com/t5/arcgis-online-ideas/map-viewer-dynamic-date-filter-based-on-current/idc-p/1661172#M13433</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/472412"&gt;@mwartman_grey&lt;/a&gt;&amp;nbsp; This is not a solution but ..&amp;nbsp; you could try applying a symbology style using an arcade expression that will return a boolean True / False if your feature falls within the current year (and you only change the symbology to show the True results).&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;currentYear&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;Year&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Now&lt;/SPAN&gt;&lt;SPAN&gt;());&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;YearNow&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;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&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(replacing &amp;lt;DateField&amp;gt; with your date field).&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;Then use Types (unique symbols) symbology.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Assuming your layer refresh is on,, this should make the layer dynamic.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Oct 2025 06:24:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-ideas/map-viewer-dynamic-date-filter-based-on-current/idc-p/1661172#M13433</guid>
      <dc:creator>MoyaCalvert_01</dc:creator>
      <dc:date>2025-10-28T06:24:11Z</dc:date>
    </item>
  </channel>
</rss>

