<?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 Pulldata query problem: unable to select specific date in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/pulldata-query-problem-unable-to-select-specific/m-p/1701807#M66194</link>
    <description>&lt;P&gt;Hello all&lt;/P&gt;&lt;P&gt;I have a pulldata function that utilizes a date field for a query. I can use orderByFields ASC and DESC successfully, but when I try a simple "and Current_date= DATE 'YYYY-MM-DD' in my concat statement, it does not work.&lt;/P&gt;&lt;P&gt;Doesn't work: pulldata("@layer","getValue", "attributes.variable",concat( ${URL},&amp;nbsp; &amp;nbsp; &amp;nbsp; "?t=", now() ), ${where} )&lt;/P&gt;&lt;P&gt;where: concat("Plot=",${plot}, "and Current_Date= DATE '2026-05-12' " )&lt;/P&gt;&lt;P&gt;I've tried many different methods involving TIMESTAMPS and Intervals to no success, so I'm starting with a simple query to narrow down the problem. Can anyone suggest why ordering would work and not the other? I suspect that caches are involved, but not sure. Thanks for any help.&lt;/P&gt;&lt;P&gt;Doug&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 13 May 2026 16:28:30 GMT</pubDate>
    <dc:creator>DouglasMarshall1</dc:creator>
    <dc:date>2026-05-13T16:28:30Z</dc:date>
    <item>
      <title>Pulldata query problem: unable to select specific date</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/pulldata-query-problem-unable-to-select-specific/m-p/1701807#M66194</link>
      <description>&lt;P&gt;Hello all&lt;/P&gt;&lt;P&gt;I have a pulldata function that utilizes a date field for a query. I can use orderByFields ASC and DESC successfully, but when I try a simple "and Current_date= DATE 'YYYY-MM-DD' in my concat statement, it does not work.&lt;/P&gt;&lt;P&gt;Doesn't work: pulldata("@layer","getValue", "attributes.variable",concat( ${URL},&amp;nbsp; &amp;nbsp; &amp;nbsp; "?t=", now() ), ${where} )&lt;/P&gt;&lt;P&gt;where: concat("Plot=",${plot}, "and Current_Date= DATE '2026-05-12' " )&lt;/P&gt;&lt;P&gt;I've tried many different methods involving TIMESTAMPS and Intervals to no success, so I'm starting with a simple query to narrow down the problem. Can anyone suggest why ordering would work and not the other? I suspect that caches are involved, but not sure. Thanks for any help.&lt;/P&gt;&lt;P&gt;Doug&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 May 2026 16:28:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/pulldata-query-problem-unable-to-select-specific/m-p/1701807#M66194</guid>
      <dc:creator>DouglasMarshall1</dc:creator>
      <dc:date>2026-05-13T16:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: Pulldata query problem: unable to select specific date</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/pulldata-query-problem-unable-to-select-specific/m-p/1702072#M66197</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/963824"&gt;@DouglasMarshall1&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try:&lt;/P&gt;&lt;PRE&gt;&amp;lt;date_field&amp;gt; = timestamp 'yyyy-mm-dd HH24:mm:ss'&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This came from&amp;nbsp;&lt;A href="https://developers.arcgis.com/rest/services-reference/enterprise/query-feature-service-layer/#date-time-queries" target="_blank"&gt;https://developers.arcgis.com/rest/services-reference/enterprise/query-feature-service-layer/#date-time-queries&lt;/A&gt;&amp;nbsp;which is the REST API operation the pulldata("@layer") function is using.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I would also suggest testing your where clause using the query operation on the REST API directly to see if it works there.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 May 2026 15:14:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/pulldata-query-problem-unable-to-select-specific/m-p/1702072#M66197</guid>
      <dc:creator>ZacharySutherby</dc:creator>
      <dc:date>2026-05-14T15:14:20Z</dc:date>
    </item>
    <item>
      <title>Re: Pulldata query problem: unable to select specific date</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/pulldata-query-problem-unable-to-select-specific/m-p/1702334#M66205</link>
      <description>&lt;P&gt;Zach&lt;/P&gt;&lt;P&gt;Thank you for the prompt reply and advice. I have tried timestamps and current_timestamp and intervals with no luck. I have put default values in the Excel sheet (see attachment) and get blank results, so I know the pulldata function is doing something. To be honest, it's probably something incredibly simple as the program is accepting my Date field for orderByFields. I'm an ArcGIS veteran, so I'm used to answers right in front of me, likely due to my limited understanding of SQL (LOL). Anyway, at your convenience if you have the time, please take a look and let me know what you think.&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2026 18:53:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/pulldata-query-problem-unable-to-select-specific/m-p/1702334#M66205</guid>
      <dc:creator>DouglasMarshall1</dc:creator>
      <dc:date>2026-05-15T18:53:12Z</dc:date>
    </item>
    <item>
      <title>Re: Pulldata query problem: unable to select specific date</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/pulldata-query-problem-unable-to-select-specific/m-p/1702557#M66210</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Doug,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I've got a couple of suggestions.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1. Try converting time to the Unix epoch, most calculations involving date need to be done in Unix. I assume that same may apply here even though it's a SQL query.&amp;nbsp; I'd do the calculation in a separate field and pass it in.&amp;nbsp; Here's some info on time calculations.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://doc.arcgis.com/en/survey123/desktop/create-surveys/decimaldatetime.htm" target="_blank"&gt;Date and time—ArcGIS Survey123 | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;2. In my experience date queries need to match exactly, including the time. So, querying for date '2026-05-12' may not return anything because the fields are YYYY-MM-DD HH:MM:SS and 2026-05-12 is not an exact match if the field is 2026-05-12 12:00:00 AM.&amp;nbsp; If your data is collected date only where the time is consistently a single time, usually 12:00:00, try adding that to the query. If the times vary you may need to try the contains operator and see if that works.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. Also, if your data is hosted in AGOL the time zone of the data is likely going to be different than what you see.&amp;nbsp; Times are usually stored in UTC-0 in AGOL. Export your data into an excel spreadsheet and you'll see the difference when you compare them with what you see on screen. In my forms that collect date/time data I've added a UTC offset field and use pulldata to calculate the utc offset, which varies when daylight savings is in effect, so I've got a hard coded offset that I can use to adjust my times to get appropriate interactions with the hosted feature service.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2026 14:14:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/pulldata-query-problem-unable-to-select-specific/m-p/1702557#M66210</guid>
      <dc:creator>TylerGraham2</dc:creator>
      <dc:date>2026-05-18T14:14:11Z</dc:date>
    </item>
  </channel>
</rss>

