<?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: Trying to query relative dates in AGOL web map in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/trying-to-query-relative-dates-in-agol-web-map/m-p/295745#M14846</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No problem, glad it work out for you. I came across this solution by searching Geonet so I can't say for certain that the advice came from a bona fide ESRi employee or just a fellow user. AGO Assistant is (wink wink nudge nudge) not officially supported so always make a back up of whatever you're about to edit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The SQL parameters you used are somewhat illustrated in the AGOL documentation. &lt;A href="https://doc.arcgis.com/en/arcgis-online/reference/sql-agol.htm"&gt;Here is the link&lt;/A&gt; to the relevant location.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Jan 2020 19:44:29 GMT</pubDate>
    <dc:creator>SteveCole</dc:creator>
    <dc:date>2020-01-30T19:44:29Z</dc:date>
    <item>
      <title>Trying to query relative dates in AGOL web map</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/trying-to-query-relative-dates-in-agol-web-map/m-p/295742#M14843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm creating a map in which I only want to show permits that have been finaled in the last year (or 6 months, etc.)&amp;nbsp; AGOL does not seem to allow the "Is within..." query.&amp;nbsp; This is weird because you can use the "Is within" in Dashboard.&amp;nbsp; Does anyone know how to query a date field in a web map using something other than a hard date? I need to query relative dates.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jan 2020 20:03:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/trying-to-query-relative-dates-in-agol-web-map/m-p/295742#M14843</guid>
      <dc:creator>KateNewell1</dc:creator>
      <dc:date>2020-01-28T20:03:11Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to query relative dates in AGOL web map</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/trying-to-query-relative-dates-in-agol-web-map/m-p/295743#M14844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kate,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had to tackle this with a recent webmap where I wanted to show only features that were projected to be replaced within 12 years. I was hoping to use a query filter on an Arcade field but that's not supported. What was suggested (and works) is to use the &lt;A href="https://ago-assistant.esri.com/"&gt;AGO Assistant&lt;/A&gt; tool to modify the underlying definition query used on the layer in your webmap. In my case, my layer's definition query was modified to this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;(a5facilitycat = 'Curb Ramp') AND (m9upgradeyr &amp;gt;= EXTRACT(YEAR FROM CURRENT_DATE()) ) AND (m9upgradeyr &amp;lt;= EXTRACT(YEAR FROM CURRENT_DATE()) + 12 )&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My attribute field "m9upgradeyr" was field with the 4 digit year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps. Good luck!&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jan 2020 20:39:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/trying-to-query-relative-dates-in-agol-web-map/m-p/295743#M14844</guid>
      <dc:creator>SteveCole</dc:creator>
      <dc:date>2020-01-28T20:39:13Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to query relative dates in AGOL web map</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/trying-to-query-relative-dates-in-agol-web-map/m-p/295744#M14845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes! Thank you so much Steve! That worked perfectly.&amp;nbsp; Was this a suggested solution from ESRI? Anything to look out for when AGOL gets updates and such? Really grateful for your response. Thank you!!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jan 2020 19:30:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/trying-to-query-relative-dates-in-agol-web-map/m-p/295744#M14845</guid>
      <dc:creator>KateNewell1</dc:creator>
      <dc:date>2020-01-30T19:30:38Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to query relative dates in AGOL web map</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/trying-to-query-relative-dates-in-agol-web-map/m-p/295745#M14846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No problem, glad it work out for you. I came across this solution by searching Geonet so I can't say for certain that the advice came from a bona fide ESRi employee or just a fellow user. AGO Assistant is (wink wink nudge nudge) not officially supported so always make a back up of whatever you're about to edit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The SQL parameters you used are somewhat illustrated in the AGOL documentation. &lt;A href="https://doc.arcgis.com/en/arcgis-online/reference/sql-agol.htm"&gt;Here is the link&lt;/A&gt; to the relevant location.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jan 2020 19:44:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/trying-to-query-relative-dates-in-agol-web-map/m-p/295745#M14846</guid>
      <dc:creator>SteveCole</dc:creator>
      <dc:date>2020-01-30T19:44:29Z</dc:date>
    </item>
  </channel>
</rss>

