<?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: Use Short Integer attribute Year (YYYY) in definition query referencing CURRENT_DATE in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/use-short-integer-attribute-year-yyyy-in/m-p/1034826#M38337</link>
    <description>&lt;P&gt;help topic&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/mapping/navigation/sql-reference-for-elements-used-in-query-expressions.htm" target="_blank"&gt;SQL reference for query expressions used in ArcGIS—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Functions, Date Functions... EXTRACT&lt;/P&gt;&lt;P&gt;perhaps&lt;/P&gt;</description>
    <pubDate>Wed, 10 Mar 2021 09:36:52 GMT</pubDate>
    <dc:creator>DanPatterson</dc:creator>
    <dc:date>2021-03-10T09:36:52Z</dc:date>
    <item>
      <title>Use Short Integer attribute Year (YYYY) in definition query referencing CURRENT_DATE</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/use-short-integer-attribute-year-yyyy-in/m-p/1034799#M38333</link>
      <description>&lt;P&gt;Hi Brains Trust. I'm trying to build a definition query (SQL) that looks a little like this;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;fih_fire_type IN ('WF') And fih_year1 &amp;gt;= (YEAR(CURRENT_DATE())-20)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;where&amp;nbsp; fih_year1 is a short integer with a year in it (i.e. 2019, 2020, etc). I want to be able to filter my data by features that have a Year value within the last 20 years.&lt;/P&gt;&lt;P&gt;I believe the CURRENT_DATE function works, but it looks like YEAR() isn't available in the definition query SQL window, meaning I can't extract the current Year as an integer. I've tried a few others and keep having the same problem (limited SQL commands available).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LindsayRaabe_FPCWA_0-1615354262532.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/8022i9F84CC37A8EC59BA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LindsayRaabe_FPCWA_0-1615354262532.png" alt="LindsayRaabe_FPCWA_0-1615354262532.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Any tips on how to make this formula work?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Mar 2021 05:33:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/use-short-integer-attribute-year-yyyy-in/m-p/1034799#M38333</guid>
      <dc:creator>LindsayRaabe_FPCWA</dc:creator>
      <dc:date>2021-03-10T05:33:17Z</dc:date>
    </item>
    <item>
      <title>Re: Use Short Integer attribute Year (YYYY) in definition query referencing CURRENT_DATE</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/use-short-integer-attribute-year-yyyy-in/m-p/1034826#M38337</link>
      <description>&lt;P&gt;help topic&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/mapping/navigation/sql-reference-for-elements-used-in-query-expressions.htm" target="_blank"&gt;SQL reference for query expressions used in ArcGIS—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Functions, Date Functions... EXTRACT&lt;/P&gt;&lt;P&gt;perhaps&lt;/P&gt;</description>
      <pubDate>Wed, 10 Mar 2021 09:36:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/use-short-integer-attribute-year-yyyy-in/m-p/1034826#M38337</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-03-10T09:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: Use Short Integer attribute Year (YYYY) in definition query referencing CURRENT_DATE</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/use-short-integer-attribute-year-yyyy-in/m-p/1035245#M38391</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/215600"&gt;@DanPatterson&lt;/a&gt;&amp;nbsp;. Thanks for the link. I think I had seen that page already and had tried the Extract function earlier but I must have been using it wrong. I tried again just now to make sure before posting, and just as well as I got it to work!&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;(fih_fire_type IN ('WF') And fih_year1 &amp;gt;= (EXTRACT(YEAR FROM CURRENT_DATE())-20)) Or (fih_fire_type = 'PB' And fih_year1 &amp;gt;= (EXTRACT(YEAR FROM CURRENT_DATE())-2))&lt;/LI-CODE&gt;&lt;P&gt;Formula now returns wildfires within the last 20 years and prescribed burns in the last 2.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Mar 2021 00:42:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/use-short-integer-attribute-year-yyyy-in/m-p/1035245#M38391</guid>
      <dc:creator>LindsayRaabe_FPCWA</dc:creator>
      <dc:date>2021-03-11T00:42:05Z</dc:date>
    </item>
  </channel>
</rss>

