<?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 feature layer date field in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-feature-layer-date-field/m-p/1199319#M78171</link>
    <description>&lt;P&gt;I'm trying to query a feature layer by a date field, and there is a problem with the 'less then' operator.&lt;/P&gt;&lt;P&gt;it is not a code problem, I'm trying to query in the feature layer rest.&lt;/P&gt;&lt;P&gt;this query works:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;CreatedTime &amp;gt; TIMESTAMP '2022-01-01 15:30:00'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but this query does not:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;CreatedTime &amp;lt; TIMESTAMP '2022-01-01 15:30:00'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is the field:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GuyShaharabani_0-1659607512256.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/47782i138E93BE463492F8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GuyShaharabani_0-1659607512256.png" alt="GuyShaharabani_0-1659607512256.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and just to be clear.. there are rows that match both conditions.&lt;/P&gt;&lt;P&gt;I Don't know if this has anything to do with it but this is the SQL field:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GuyShaharabani_1-1659607700421.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/47783i16AD53E46A44B8A7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GuyShaharabani_1-1659607700421.png" alt="GuyShaharabani_1-1659607700421.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried to use between, sometimes it works and sometimes it doesn't(working example):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;CreatedTime Between TIMESTAMP '2022-07-28 00:00:00' AND TIMESTAMP '2022-07-28 23:59:59'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;an example of a query that have no results, that does have results in sql server:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;CreatedTime Between TIMESTAMP '2021-07-01 11:00:00' AND TIMESTAMP '2022-07-06 11:00:00'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 04 Aug 2022 10:16:19 GMT</pubDate>
    <dc:creator>GuyShaharabani</dc:creator>
    <dc:date>2022-08-04T10:16:19Z</dc:date>
    <item>
      <title>query feature layer date field</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-feature-layer-date-field/m-p/1199319#M78171</link>
      <description>&lt;P&gt;I'm trying to query a feature layer by a date field, and there is a problem with the 'less then' operator.&lt;/P&gt;&lt;P&gt;it is not a code problem, I'm trying to query in the feature layer rest.&lt;/P&gt;&lt;P&gt;this query works:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;CreatedTime &amp;gt; TIMESTAMP '2022-01-01 15:30:00'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but this query does not:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;CreatedTime &amp;lt; TIMESTAMP '2022-01-01 15:30:00'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is the field:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GuyShaharabani_0-1659607512256.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/47782i138E93BE463492F8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GuyShaharabani_0-1659607512256.png" alt="GuyShaharabani_0-1659607512256.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and just to be clear.. there are rows that match both conditions.&lt;/P&gt;&lt;P&gt;I Don't know if this has anything to do with it but this is the SQL field:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GuyShaharabani_1-1659607700421.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/47783i16AD53E46A44B8A7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GuyShaharabani_1-1659607700421.png" alt="GuyShaharabani_1-1659607700421.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried to use between, sometimes it works and sometimes it doesn't(working example):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;CreatedTime Between TIMESTAMP '2022-07-28 00:00:00' AND TIMESTAMP '2022-07-28 23:59:59'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;an example of a query that have no results, that does have results in sql server:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;CreatedTime Between TIMESTAMP '2021-07-01 11:00:00' AND TIMESTAMP '2022-07-06 11:00:00'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2022 10:16:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/query-feature-layer-date-field/m-p/1199319#M78171</guid>
      <dc:creator>GuyShaharabani</dc:creator>
      <dc:date>2022-08-04T10:16:19Z</dc:date>
    </item>
  </channel>
</rss>

