<?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: ArcMap - Definition query using dates to select current week in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/arcmap-definition-query-using-dates-to-select/m-p/266092#M1717</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Some good discussion here:&amp;nbsp; &lt;A class="link-titled" href="https://stackoverflow.com/questions/23051197/how-to-get-data-of-current-week-only-in-sql-server" title="https://stackoverflow.com/questions/23051197/how-to-get-data-of-current-week-only-in-sql-server"&gt;how to get data of current week only in SQL server? - Stack Overflow&lt;/A&gt; .&amp;nbsp; The discussion is focused on SQL Server but Postgres also has a DatePart function (&lt;A class="link-titled" href="https://www.postgresql.org/docs/current/functions-datetime.html#FUNCTIONS-DATETIME-EXTRACT" title="https://www.postgresql.org/docs/current/functions-datetime.html#FUNCTIONS-DATETIME-EXTRACT"&gt;PostgreSQL: Documentation: 12: 9.9.&amp;nbsp;Date/Time Functions and Operators&lt;/A&gt;&amp;nbsp;).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 May 2020 18:36:36 GMT</pubDate>
    <dc:creator>JoshuaBixby</dc:creator>
    <dc:date>2020-05-27T18:36:36Z</dc:date>
    <item>
      <title>ArcMap - Definition query using dates to select current week</title>
      <link>https://community.esri.com/t5/developers-questions/arcmap-definition-query-using-dates-to-select/m-p/266091#M1716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would like to write a definition query expression to get features where a date field is in the current week (starting Sunday ending Saturday)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have difficulties to imagine how using CURRENT_DATE would help me in that case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want the definition expression to returns the same features from Sunday to Saturday.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My feature class is stored in PostGreSQL (ArcGIS Enterprise)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 May 2020 17:01:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/arcmap-definition-query-using-dates-to-select/m-p/266091#M1716</guid>
      <dc:creator>MaximeDemers</dc:creator>
      <dc:date>2020-05-27T17:01:24Z</dc:date>
    </item>
    <item>
      <title>Re: ArcMap - Definition query using dates to select current week</title>
      <link>https://community.esri.com/t5/developers-questions/arcmap-definition-query-using-dates-to-select/m-p/266092#M1717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Some good discussion here:&amp;nbsp; &lt;A class="link-titled" href="https://stackoverflow.com/questions/23051197/how-to-get-data-of-current-week-only-in-sql-server" title="https://stackoverflow.com/questions/23051197/how-to-get-data-of-current-week-only-in-sql-server"&gt;how to get data of current week only in SQL server? - Stack Overflow&lt;/A&gt; .&amp;nbsp; The discussion is focused on SQL Server but Postgres also has a DatePart function (&lt;A class="link-titled" href="https://www.postgresql.org/docs/current/functions-datetime.html#FUNCTIONS-DATETIME-EXTRACT" title="https://www.postgresql.org/docs/current/functions-datetime.html#FUNCTIONS-DATETIME-EXTRACT"&gt;PostgreSQL: Documentation: 12: 9.9.&amp;nbsp;Date/Time Functions and Operators&lt;/A&gt;&amp;nbsp;).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 May 2020 18:36:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/arcmap-definition-query-using-dates-to-select/m-p/266092#M1717</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2020-05-27T18:36:36Z</dc:date>
    </item>
    <item>
      <title>Re: ArcMap - Definition query using dates to select current week</title>
      <link>https://community.esri.com/t5/developers-questions/arcmap-definition-query-using-dates-to-select/m-p/1301731#M6651</link>
      <description>&lt;P&gt;The solution I have found with Postgres&lt;/P&gt;&lt;LI-CODE lang="sql"&gt;EXTRACT(WEEK FROM mydatefield) = EXTRACT(WEEK FROM CURRENT_DATE) + 1 AND EXTRACT(YEAR FROM mydatefield) = EXTRACT(YEAR FROM CURRENT_DATE)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2023 20:09:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/arcmap-definition-query-using-dates-to-select/m-p/1301731#M6651</guid>
      <dc:creator>MaximeDemers</dc:creator>
      <dc:date>2023-06-21T20:09:08Z</dc:date>
    </item>
  </channel>
</rss>

