<?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: Query 'yesterdays' edits in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/query-yesterdays-edits/m-p/1059150#M41062</link>
    <description>&lt;P&gt;Ah, I bet that's it. We're on a 10.9 postgres DB.&lt;/P&gt;&lt;P&gt;Try swapping those extracts for 'YEAR(last_edited_date)', etc., and instead of CURRENT_DATE(), try CURRENT_TIMESTAMP(). I can't test it for your setup, unfortunately.&lt;/P&gt;</description>
    <pubDate>Tue, 18 May 2021 20:20:19 GMT</pubDate>
    <dc:creator>jcarlson</dc:creator>
    <dc:date>2021-05-18T20:20:19Z</dc:date>
    <item>
      <title>Query 'yesterdays' edits</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/query-yesterdays-edits/m-p/1059129#M41059</link>
      <description>&lt;P&gt;I'm trying to figure out a way to query feature classes based on the 'last_edited_date' field so that it shows features that were edited yesterday.&lt;/P&gt;&lt;P&gt;So for today (5/18/2021), anything that has 5/17/2021 in the last_edited_date field regardless of time. And for tomorrow, anything that has 5/18/2021.&lt;/P&gt;&lt;P&gt;I've been trying to use the 'CURRENT_DATE' function in SQL, but that doesn't seem to be working.&lt;/P&gt;&lt;P&gt;Any help is appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 18 May 2021 19:50:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/query-yesterdays-edits/m-p/1059129#M41059</guid>
      <dc:creator>HeatherScroggins</dc:creator>
      <dc:date>2021-05-18T19:50:27Z</dc:date>
    </item>
    <item>
      <title>Re: Query 'yesterdays' edits</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/query-yesterdays-edits/m-p/1059143#M41060</link>
      <description>&lt;P&gt;It may depend on where your data is stored, but using CURRENT_DATE() does seem to work against a service I tested. Pairing it with EXTRACT, you can easily isolate a single date.&lt;/P&gt;&lt;PRE&gt;EXTRACT(YEAR FROM last_edited_date) = EXTRACT(YEAR FROM CURRENT_DATE())&lt;BR /&gt;AND&lt;BR /&gt;EXTRACT(MONTH FROM last_edited_date) = EXTRACT(MONTH FROM CURRENT_DATE())&lt;BR /&gt;AND&lt;BR /&gt;EXTRACT(DAY FROM last_edited_date) = EXTRACT(DAY FROM CURRENT_DATE()) - 1&lt;/PRE&gt;&lt;P&gt;Yields:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jcarlson_1-1621368563235.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/13564i49FAB2CC5F8709D7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jcarlson_1-1621368563235.png" alt="jcarlson_1-1621368563235.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 May 2021 20:09:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/query-yesterdays-edits/m-p/1059143#M41060</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-05-18T20:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: Query 'yesterdays' edits</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/query-yesterdays-edits/m-p/1059148#M41061</link>
      <description>&lt;P&gt;Hmm.....it didn't seem to like that. I just get 'There was an error with the expression.'&lt;/P&gt;&lt;P&gt;As for where my data is stored, it's in a 10.7 enterprise geodatabase on SQL (2014).&lt;/P&gt;</description>
      <pubDate>Tue, 18 May 2021 20:16:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/query-yesterdays-edits/m-p/1059148#M41061</guid>
      <dc:creator>HeatherScroggins</dc:creator>
      <dc:date>2021-05-18T20:16:51Z</dc:date>
    </item>
    <item>
      <title>Re: Query 'yesterdays' edits</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/query-yesterdays-edits/m-p/1059150#M41062</link>
      <description>&lt;P&gt;Ah, I bet that's it. We're on a 10.9 postgres DB.&lt;/P&gt;&lt;P&gt;Try swapping those extracts for 'YEAR(last_edited_date)', etc., and instead of CURRENT_DATE(), try CURRENT_TIMESTAMP(). I can't test it for your setup, unfortunately.&lt;/P&gt;</description>
      <pubDate>Tue, 18 May 2021 20:20:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/query-yesterdays-edits/m-p/1059150#M41062</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-05-18T20:20:19Z</dc:date>
    </item>
    <item>
      <title>Re: Query 'yesterdays' edits</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/query-yesterdays-edits/m-p/1059155#M41063</link>
      <description>&lt;P&gt;Alright, that seemed to do the trick. I ended up with:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;YEAR(last_edited_date)=YEAR(CURRENT_TIMESTAMP)
AND
MONTH(last_edited_date)=MONTH(CURRENT_TIMESTAMP)
AND
DAY(last_edited_date)=DAY(CURRENT_TIMESTAMP)-1&lt;/LI-CODE&gt;&lt;P&gt;And that seemed to do the trick.&lt;/P&gt;&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 May 2021 20:31:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/query-yesterdays-edits/m-p/1059155#M41063</guid>
      <dc:creator>HeatherScroggins</dc:creator>
      <dc:date>2021-05-18T20:31:46Z</dc:date>
    </item>
  </channel>
</rss>

