Solved

ArcGIS Portal Feature Service Date Where Queries Confusion

  • 31 January 2023
  • 2 replies
  • 17 views

Badge +1

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

 

 

 

icon

Best answer by rahulsharma 8 February 2023, 00:15

View original

2 replies

Badge +8

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

 

Badge +8

Short demo with a portal

Reply