Skip to main content
Solved

ArcGIS Portal Feature Service Date Where Queries Confusion

  • January 30, 2023
  • 2 replies
  • 107 views

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

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

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