Skip to main content
Solved

ArcGIS Portal Feature Service Date Where Queries Confusion


peteratqfes
Contributor
Forum|alt.badge.img+6

Hi,

 

I have a host feature layer on Portal 10.8.1 and want to use a date where query.

 

Documentation from ESRI point to being able to use Intervals in the query but when I try to use in the Portal Feature Service reader the server returns a 400 error.

 

https://www.esri.com/arcgis-blog/products/api-rest/data-management/querying-feature-services-date-time-queries/

 

It appears you can only use a proportion of a day in the FME query. The help page FME desktop points you to from ESRI isn't exactly that informative.

 

https://doc.arcgis.com/en/arcgis-online/reference/sql-agol.htm

 

Is this a Portal versus AGOL difference?

 

This works:

"created_date" >= CURRENT_TIMESTAMP() - 0.015

 

This doesn't:

"created_date" >= CURRENT_TIMESTAMP - INTERVAL '15' MINUTE

 

If anyone can point me to a definitive page with the documentation for where datetime queries for hosted Portal feature layers.... 😀

 

Thanks,

Peter

 

 

 

Best answer by rahulsharma

Short demo with a portal

View original
Did this help you find an answer to your question?

2 replies

rahulsharma
Safer
Forum|alt.badge.img+10
  • Safer
  • February 7, 2023

Hi @Anastasia Petrenko​ 

Appears to be working as expected without any issues. 

Tested against an ArcGIS Portal 10.9.1 (Enterprise) with hosted feature service. 

"firediscoverydatetime">= CURRENT_TIMESTAMP - INTERVAL '360' HOUR
"firediscoverydatetime">= CURRENT_TIMESTAMP - INTERVAL '1440' MINUTE
"firediscoverydatetime">= CURRENT_TIMESTAMP - 10

 


rahulsharma
Safer
Forum|alt.badge.img+10
  • Safer
  • Best Answer
  • February 7, 2023

Short demo with a portal


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings