Select to view content in your preferred language

Pulldata query problem: unable to select specific date

90
1
yesterday
DouglasMarshall1
New Contributor

Hello all

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.

Doesn't work: pulldata("@layer","getValue", "attributes.variable",concat( ${URL},      "?t=", now() ), ${where} )

where: concat("Plot=",${plot}, "and Current_Date= DATE '2026-05-12' " )

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.

Doug

 

0 Kudos
1 Reply
ZacharySutherby
Esri Regular Contributor

Hey @DouglasMarshall1

Try:

<date_field> = timestamp 'yyyy-mm-dd HH24:mm:ss'

 

This came from https://developers.arcgis.com/rest/services-reference/enterprise/query-feature-service-layer/#date-t... which is the REST API operation the pulldata("@layer") function is using. 

I would also suggest testing your where clause using the query operation on the REST API directly to see if it works there.  

Thank you,
Zach
0 Kudos