<?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 SQL functions in Definition Query - Datepart in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/sql-functions-in-definition-query-datepart/m-p/1538422#M88265</link>
    <description>&lt;P&gt;Hello everyone.&lt;BR /&gt;&lt;BR /&gt;I've working with a big dataset stored in an enterprise geodatabase, months ago I upload a service that use a definition query that use dates as in DateField &amp;lt;= current_timestamp - 1&lt;BR /&gt;&lt;BR /&gt;Now I´m wondering how to use the DATEPART function to do something similar, the expression is:&lt;BR /&gt;&lt;BR /&gt;Day BETWEEN 1 AND DATEPART(DAY, CURRENT_DATE)&lt;BR /&gt;&lt;BR /&gt;All of the keywords except "DAY" are suggested by PRO, I also tried:&lt;/P&gt;&lt;P&gt;DATEPART(dd, CURRENT_DATE)&lt;/P&gt;&lt;P&gt;DATEPART(d, CURRENT_DATE)&lt;/P&gt;&lt;P&gt;DATEPART(DAY FROM CURRENT_DATE)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And no one works (The SQL expression has invalid syntax.), where is the issue?&lt;/P&gt;</description>
    <pubDate>Fri, 13 Sep 2024 17:58:13 GMT</pubDate>
    <dc:creator>EduardoDC</dc:creator>
    <dc:date>2024-09-13T17:58:13Z</dc:date>
    <item>
      <title>SQL functions in Definition Query - Datepart</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/sql-functions-in-definition-query-datepart/m-p/1538422#M88265</link>
      <description>&lt;P&gt;Hello everyone.&lt;BR /&gt;&lt;BR /&gt;I've working with a big dataset stored in an enterprise geodatabase, months ago I upload a service that use a definition query that use dates as in DateField &amp;lt;= current_timestamp - 1&lt;BR /&gt;&lt;BR /&gt;Now I´m wondering how to use the DATEPART function to do something similar, the expression is:&lt;BR /&gt;&lt;BR /&gt;Day BETWEEN 1 AND DATEPART(DAY, CURRENT_DATE)&lt;BR /&gt;&lt;BR /&gt;All of the keywords except "DAY" are suggested by PRO, I also tried:&lt;/P&gt;&lt;P&gt;DATEPART(dd, CURRENT_DATE)&lt;/P&gt;&lt;P&gt;DATEPART(d, CURRENT_DATE)&lt;/P&gt;&lt;P&gt;DATEPART(DAY FROM CURRENT_DATE)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And no one works (The SQL expression has invalid syntax.), where is the issue?&lt;/P&gt;</description>
      <pubDate>Fri, 13 Sep 2024 17:58:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/sql-functions-in-definition-query-datepart/m-p/1538422#M88265</guid>
      <dc:creator>EduardoDC</dc:creator>
      <dc:date>2024-09-13T17:58:13Z</dc:date>
    </item>
  </channel>
</rss>

