AnsweredAssumed Answered

Querying dates using REST API

Question asked by leftieant76 on Aug 27, 2017

Hi

 

I'm using the arcrest Python module to automate regular extraction data from a AGOL feature service, which is generated from Survey 123.

 

I would like to be able to query out subsets of records based on creation date, but cannot for the life of me work out the correct syntax to make this occur.

 

I am using this script as my base:

 

ArcREST/create_replica_portal_item.py at master · Esri/ArcREST · GitHub 

 

With the date query being implemented on Line 65:

 

    "where": "SURVEY_COMMENCED >= DATE '2017-08-01 00:00:00'"

 

The field I am referencing is a datetime field, and all of the documentation I have found points to this being the correct syntax.

 

Can anyone steer me in the right direction?

Outcomes