Querying dates using REST API

587
0
08-27-2017 06:57 PM
AnthonyCheesman1
Occasional Contributor II

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?

Tags (3)
0 Kudos
0 Replies