<?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 Query items from today's date using Python API in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/query-items-from-today-s-date-using-python-api/m-p/1118914#M6835</link>
    <description>&lt;P&gt;I am not sure if this is the correct spot to ask this question, but I am trying to write code to query features created during today's date. I have figured out querying works in general;&lt;/P&gt;&lt;P&gt;from datetime import date&lt;BR /&gt;today = date.today()&lt;BR /&gt;query1 = Assignments.query(where="Status = 3")&lt;BR /&gt;query1&lt;/P&gt;&lt;PRE&gt;&amp;lt;FeatureSet&amp;gt; 29 features&lt;/PRE&gt;&lt;P&gt;But I am unsure how to do this with date types. Any suggestions?&lt;/P&gt;&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 19 Nov 2021 21:53:46 GMT</pubDate>
    <dc:creator>3CDCOrganizationalAccount</dc:creator>
    <dc:date>2021-11-19T21:53:46Z</dc:date>
    <item>
      <title>Query items from today's date using Python API</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/query-items-from-today-s-date-using-python-api/m-p/1118914#M6835</link>
      <description>&lt;P&gt;I am not sure if this is the correct spot to ask this question, but I am trying to write code to query features created during today's date. I have figured out querying works in general;&lt;/P&gt;&lt;P&gt;from datetime import date&lt;BR /&gt;today = date.today()&lt;BR /&gt;query1 = Assignments.query(where="Status = 3")&lt;BR /&gt;query1&lt;/P&gt;&lt;PRE&gt;&amp;lt;FeatureSet&amp;gt; 29 features&lt;/PRE&gt;&lt;P&gt;But I am unsure how to do this with date types. Any suggestions?&lt;/P&gt;&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Nov 2021 21:53:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/query-items-from-today-s-date-using-python-api/m-p/1118914#M6835</guid>
      <dc:creator>3CDCOrganizationalAccount</dc:creator>
      <dc:date>2021-11-19T21:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: Query items from today's date using Python API</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/query-items-from-today-s-date-using-python-api/m-p/1118938#M6836</link>
      <description>&lt;P&gt;It can depend on the database that you're querying. If it's an enterprise geodatabase, see t&lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/mapping/navigation/sql-reference-for-elements-used-in-query-expressions.htm#GUID-85C03D85-F4A5-48FC-8E8C-3F79919430DB" target="_blank"&gt;he reference page for how to query each of them&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;In general, however, you can write the query as follows.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Assignments.query(where=f"EditDate_1 &amp;lt;= date '{datetime.date.today()}'")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Nov 2021 22:32:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/query-items-from-today-s-date-using-python-api/m-p/1118938#M6836</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-11-19T22:32:30Z</dc:date>
    </item>
  </channel>
</rss>

