<?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: arcade filter SQL DateAdd in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/arcade-filter-sql-dateadd/m-p/1578130#M41487</link>
    <description>&lt;P&gt;It's a hosted feature layer, So I'm using the ArcGIS relational datastore on ArcGIS 11.3.&lt;/P&gt;</description>
    <pubDate>Thu, 23 Jan 2025 09:27:16 GMT</pubDate>
    <dc:creator>BartWolf</dc:creator>
    <dc:date>2025-01-23T09:27:16Z</dc:date>
    <item>
      <title>arcade filter SQL DateAdd</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/arcade-filter-sql-dateadd/m-p/1577764#M41479</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;Working on a dashboard serial chart (Enterprise 11.3)...&lt;BR /&gt;I'm trying to filter a featureset in a data-expression by evaluating 2 date-fields&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's my code...&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var fs = FeatureSetByPortalItem(portal, '48ae0546f8ef4cd0b7039cd44ed0f4b4')
Console(Count(fs))
//var crFilt = `Date_Created &amp;lt; DateAdd(DATUM, -1, 'months')`  //not working
var crFilt = `Date_Created &amp;lt; DATEADD('month', -1, DATUM)`     //not working SQL92 syntax
var resFs =  Filter(resFs, crFilt);
Console(Count(resFs))&lt;/LI-CODE&gt;&lt;P&gt;So I want to substract 1 month from the date in field [DATUM] and filter the records where [Date_Created] &amp;lt; recalculated fieldvalues...&lt;BR /&gt;&lt;BR /&gt;Could this be done?&amp;nbsp; Or is "DateAdd" just not supported?&lt;BR /&gt;&lt;SPAN&gt;I'm getting this error in both cases: "&lt;/SPAN&gt;&lt;SPAN&gt;Test execution error: Invalid parameters for call to DATEADD. Verify test data."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks in advance..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jan 2025 14:19:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/arcade-filter-sql-dateadd/m-p/1577764#M41479</guid>
      <dc:creator>BartWolf</dc:creator>
      <dc:date>2025-01-22T14:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: arcade filter SQL DateAdd</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/arcade-filter-sql-dateadd/m-p/1577796#M41480</link>
      <description>&lt;P&gt;Manipulating dates and times are very data source specific, so it would be helpful if you shared the back-end data store the data resides in.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jan 2025 15:29:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/arcade-filter-sql-dateadd/m-p/1577796#M41480</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2025-01-22T15:29:24Z</dc:date>
    </item>
    <item>
      <title>Re: arcade filter SQL DateAdd</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/arcade-filter-sql-dateadd/m-p/1578130#M41487</link>
      <description>&lt;P&gt;It's a hosted feature layer, So I'm using the ArcGIS relational datastore on ArcGIS 11.3.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jan 2025 09:27:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/arcade-filter-sql-dateadd/m-p/1578130#M41487</guid>
      <dc:creator>BartWolf</dc:creator>
      <dc:date>2025-01-23T09:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: arcade filter SQL DateAdd</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/arcade-filter-sql-dateadd/m-p/1578196#M41491</link>
      <description>&lt;P&gt;The ArcGIS Relational Data Store is based on PostgreSQL, which doesn't support DATEADD.&amp;nbsp; Try using native PostgreSQL Date/Time functions:&amp;nbsp; &lt;A href="https://www.postgresql.org/docs/current/functions-datetime.html" target="_blank"&gt;https://www.postgresql.org/docs/current/functions-datetime.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jan 2025 14:32:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/arcade-filter-sql-dateadd/m-p/1578196#M41491</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2025-01-23T14:32:31Z</dc:date>
    </item>
  </channel>
</rss>

