<?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 Remove Timestamp in Date Field used in Filter in Attribute Rules Questions</title>
    <link>https://community.esri.com/t5/attribute-rules-questions/remove-timestamp-in-date-field-used-in-filter/m-p/1343294#M1157</link>
    <description>&lt;P&gt;We need to count how many sample points were captured within a sampled area. To do this, I've setup an Arcade script that evaluates the selected sample area against the intersecting sample point feature class. However, I need to filter the intersecting sample points by the sample_date field since an area may be sampled multiple times (on different dates).&amp;nbsp;I tried to filter the sample points by the selected sample area's date, but I continue to get a '0' because of the timestamp included in both fields. I was able to remove the timestamp on the sample area sample_date field (var smpldt below). However, I'm not sure how to remove the timestamp from the sample points "sample_date" field in the SQL statement. Is there a way to do this so that the number of sample points for a specific date populate?&lt;/P&gt;&lt;P&gt;var buff_areas = Buffer($feature, 50, "feet");&lt;/P&gt;&lt;P&gt;var intersecting_points = Intersects(FeatureSetByName($datastore, "Sample_Points_FC_Name"), buff_areas);&lt;BR /&gt;var smpldt = Text($feature.sample_date, 'Y-MM-DD');&lt;/P&gt;&lt;P&gt;var filtersmpldt = Filter(intersecting_points, "sample_date = '" + smpldt + "'");&lt;BR /&gt;var cnt = Count(filtersmpldt);&lt;/P&gt;&lt;P&gt;return cnt&lt;/P&gt;</description>
    <pubDate>Mon, 30 Oct 2023 14:58:08 GMT</pubDate>
    <dc:creator>Chip727</dc:creator>
    <dc:date>2023-10-30T14:58:08Z</dc:date>
    <item>
      <title>Remove Timestamp in Date Field used in Filter</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/remove-timestamp-in-date-field-used-in-filter/m-p/1343294#M1157</link>
      <description>&lt;P&gt;We need to count how many sample points were captured within a sampled area. To do this, I've setup an Arcade script that evaluates the selected sample area against the intersecting sample point feature class. However, I need to filter the intersecting sample points by the sample_date field since an area may be sampled multiple times (on different dates).&amp;nbsp;I tried to filter the sample points by the selected sample area's date, but I continue to get a '0' because of the timestamp included in both fields. I was able to remove the timestamp on the sample area sample_date field (var smpldt below). However, I'm not sure how to remove the timestamp from the sample points "sample_date" field in the SQL statement. Is there a way to do this so that the number of sample points for a specific date populate?&lt;/P&gt;&lt;P&gt;var buff_areas = Buffer($feature, 50, "feet");&lt;/P&gt;&lt;P&gt;var intersecting_points = Intersects(FeatureSetByName($datastore, "Sample_Points_FC_Name"), buff_areas);&lt;BR /&gt;var smpldt = Text($feature.sample_date, 'Y-MM-DD');&lt;/P&gt;&lt;P&gt;var filtersmpldt = Filter(intersecting_points, "sample_date = '" + smpldt + "'");&lt;BR /&gt;var cnt = Count(filtersmpldt);&lt;/P&gt;&lt;P&gt;return cnt&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2023 14:58:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/remove-timestamp-in-date-field-used-in-filter/m-p/1343294#M1157</guid>
      <dc:creator>Chip727</dc:creator>
      <dc:date>2023-10-30T14:58:08Z</dc:date>
    </item>
  </channel>
</rss>

