Querying a date field, but API does not return valid matches for exact date

309
0
03-04-2022 11:18 AM
ewagstaff
New Contributor III

Hi all, using the ArcGIS REST API, I am unable to do a date query that gets results for the exact date matching a feature's attribute. For example, I have a feature with "created_date": 1646417844731 (2022-03-04 around 10am Pacific Time), but if I query with a 'where' param of

created_date = DATE '2022-03-04'

 
it returns no features. This syntax SHOULD be working, according to the ArcGIS blog: https://www.esri.com/arcgis-blog/products/api-rest/data-management/querying-feature-services-date-ti...

Worth noting that the > and < operators are working exactly as expected -- both of these 'where' params return the feature I'm looking for:

created_date < DATE '2022-03-05'
created_date > DATE '2022-03-04'

 

Should I not be using the = operator to find today's matches? Please let me know if you can spot the error here.

 

0 Kudos
0 Replies