2

Until a few days ago, this query ran without problems:

https://dhsgis.wi.gov/server/rest/services/DHS_COVID19/COVID19_WI_V2/MapServer/11/query?where=RptDt>='2022-05-01'&outFields=*&returnGeometry=false&outSR=4326&f=json

Now it returns:

error   
    code            400
    extendedCode    -2147220985
    message         "Unable to complete operation."
    details         []

The URL without RptDt specification still works just fine:

https://dhsgis.wi.gov/server/rest/services/DHS_COVID19/COVID19_WI_V2/MapServer/11/query?where=1%3D1&outFields=*&returnGeometry=false&outSR=4326&f=json

Here is a link to the open data portal resource.

The trouble appears to be in this bit: where=RptDt>='2022-05-01'.

Did ArcGIS change the formatting for date values? Does anyone know how I can update my URL to work properly?

John J.
  • 1,450
  • 1
  • 13
  • 28

1 Answers1

3

If you change the date query to use a standardized date format it seems to work fine, ie using RptDt>=date'2022-05-01' instead of RptDt>='2022-05-01'.

Updated example URL: https://dhsgis.wi.gov/server/rest/services/DHS_COVID19/COVID19_WI_V2/MapServer/11/query?where=RptDt%3E=date%272022-05-01%27&outFields=*&returnGeometry=false&outSR=4326&f=json

Bjorn Svensson
  • 815
  • 8
  • 21
  • If you happen to be using a datetime instead of a date, use `timestamp` instead of `date` as mentioned above, and make sure your datetime is formatted correctly. See for more details. – jhovanec May 09 '23 at 14:30