【问题标题】:ArcGIS url query using date parameter stopped working overnight使用日期参数的 ArcGIS url 查询在一夜之间停止工作
【发布时间】:2022-08-11 23:28:24
【问题描述】:

直到几天前,这个查询运行没有问题:

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

现在它返回:

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

没有 RptDt 规范的 URL 仍然可以正常工作:

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.

问题似乎出在这一位:where=RptDt>=\'2022-05-01\'

ArcGIS 是否更改了日期值的格式?有谁知道我如何更新我的 URL 才能正常工作?

    标签: arcgis arcgis-server


    【解决方案1】:

    如果您将日期查询更改为使用标准化的日期格式,它似乎可以正常工作,即使用RptDt>=date'2022-05-01' 而不是RptDt>='2022-05-01'

    更新的示例 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

    【讨论】:

      猜你喜欢
      • 2018-07-15
      • 1970-01-01
      • 2017-10-24
      • 1970-01-01
      • 2016-05-16
      • 2019-06-19
      • 2020-06-09
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多