<?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: Adding modified date range to gis.content.search in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/adding-modified-date-range-to-gis-content-search/m-p/793578#M1688</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/262602"&gt;Andrew Thompson&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;You are just missing 3 zeros in front of the UNIX times and also double quotation marks.&lt;/P&gt;&lt;P&gt;Your code has to be as follows:&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;search_result &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; gis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;content&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;search&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;query&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"modified:[1577840400000 TO 1609455600000]"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; item_type&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Feature Service"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; sort_field&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"modified"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; sort_order&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"desc"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; max_items&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;5000&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Aug 2020 06:49:12 GMT</pubDate>
    <dc:creator>MehdiPira1</dc:creator>
    <dc:date>2020-08-18T06:49:12Z</dc:date>
    <item>
      <title>Adding modified date range to gis.content.search</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/adding-modified-date-range-to-gis-content-search/m-p/793577#M1687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to add a date modified range query to this API call below:&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;search_result &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; gis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;content&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;search&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;query&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;modified&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;DATERANGE&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; item_type&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Feature Service"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; sort_field&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"modified"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; sort_order&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"desc"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; max_items&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;5000&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tested the query="title:NAMEOFLAYER" and it works fine. But I cant get the right syntax for the query=modified:&lt;/P&gt;&lt;P&gt;I have tried the above syntax, plus these: &lt;SPAN style="color: #000000;"&gt;query="modified [1577840400 TO 1609455600]", query=modified 1577840400 TO 1609455600, query='modified [1577840400 TO 1609455600]'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I cant find any examples of the right syntax for this to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2020 20:21:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/adding-modified-date-range-to-gis-content-search/m-p/793577#M1687</guid>
      <dc:creator>AndrewThompson2</dc:creator>
      <dc:date>2020-08-17T20:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: Adding modified date range to gis.content.search</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/adding-modified-date-range-to-gis-content-search/m-p/793578#M1688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/262602"&gt;Andrew Thompson&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;You are just missing 3 zeros in front of the UNIX times and also double quotation marks.&lt;/P&gt;&lt;P&gt;Your code has to be as follows:&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;search_result &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; gis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;content&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;search&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;query&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"modified:[1577840400000 TO 1609455600000]"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; item_type&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Feature Service"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; sort_field&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"modified"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; sort_order&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"desc"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; max_items&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;5000&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Aug 2020 06:49:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/adding-modified-date-range-to-gis-content-search/m-p/793578#M1688</guid>
      <dc:creator>MehdiPira1</dc:creator>
      <dc:date>2020-08-18T06:49:12Z</dc:date>
    </item>
  </channel>
</rss>

