<?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 How to query ArcGIS feature layer's date type column using epoch time format in ArcGIS REST JS Questions</title>
    <link>https://community.esri.com/t5/arcgis-rest-js-questions/how-to-query-arcgis-feature-layer-s-date-type/m-p/1315307#M41</link>
    <description>&lt;P&gt;Hey all, I was wondering if it was possible to perform a query on a DATE type column for an ArcGIS feature layer using an epoch time format.&lt;BR /&gt;&lt;BR /&gt;For example this query works fine:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;DATE =  '7/28/2023 12:00:00 AM'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But when using epoch time that matches the date above, it does not return any results:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;DATE = 1690520400000&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What's also slightly confusing too is when I set the return format type to "JSON" for the ArcGIS REST Services directory when querying the feature layer, the DATE field is actually returning an epoch timestamp instead of the date string seen when the return format type is set to "HTML", so I would have imagined it would be possible to use epoch time for these queries.&lt;BR /&gt;&lt;BR /&gt;Did not see anything regarding the ability to use epoch timestamps for these queries in the documentation, so perhaps it's just not possible or I'm missing something here?&lt;/P&gt;</description>
    <pubDate>Thu, 03 Aug 2023 21:19:59 GMT</pubDate>
    <dc:creator>celliott</dc:creator>
    <dc:date>2023-08-03T21:19:59Z</dc:date>
    <item>
      <title>How to query ArcGIS feature layer's date type column using epoch time format</title>
      <link>https://community.esri.com/t5/arcgis-rest-js-questions/how-to-query-arcgis-feature-layer-s-date-type/m-p/1315307#M41</link>
      <description>&lt;P&gt;Hey all, I was wondering if it was possible to perform a query on a DATE type column for an ArcGIS feature layer using an epoch time format.&lt;BR /&gt;&lt;BR /&gt;For example this query works fine:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;DATE =  '7/28/2023 12:00:00 AM'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But when using epoch time that matches the date above, it does not return any results:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;DATE = 1690520400000&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What's also slightly confusing too is when I set the return format type to "JSON" for the ArcGIS REST Services directory when querying the feature layer, the DATE field is actually returning an epoch timestamp instead of the date string seen when the return format type is set to "HTML", so I would have imagined it would be possible to use epoch time for these queries.&lt;BR /&gt;&lt;BR /&gt;Did not see anything regarding the ability to use epoch timestamps for these queries in the documentation, so perhaps it's just not possible or I'm missing something here?&lt;/P&gt;</description>
      <pubDate>Thu, 03 Aug 2023 21:19:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-js-questions/how-to-query-arcgis-feature-layer-s-date-type/m-p/1315307#M41</guid>
      <dc:creator>celliott</dc:creator>
      <dc:date>2023-08-03T21:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to query ArcGIS feature layer's date type column using epoch time format</title>
      <link>https://community.esri.com/t5/arcgis-rest-js-questions/how-to-query-arcgis-feature-layer-s-date-type/m-p/1315330#M42</link>
      <description>&lt;P&gt;Maybe you have to convert the format of the Epoch value something like&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;DATEADD(s, 1624705077, '1970-01-01 00:00:00')&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;So you're REST query would be something like&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;DATE =&amp;nbsp;DATEADD(s, 1624705077, '1970-01-01 00:00:00')&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;SQL allows for some functions and operators within the actual SQL string so I wonder if this is one of those situations...&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;</description>
      <pubDate>Thu, 03 Aug 2023 21:55:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-js-questions/how-to-query-arcgis-feature-layer-s-date-type/m-p/1315330#M42</guid>
      <dc:creator>SteveCole</dc:creator>
      <dc:date>2023-08-03T21:55:20Z</dc:date>
    </item>
  </channel>
</rss>

