Querying a date field based on Epoch time values in ArcGIS GIS Server 10.5 REST endpoint of a hosted feature service stored in the relational ArcGIS Data Store 10.5.1 returns "Database Error".
上次发布: August 13, 2018ArcGIS GIS Server
漏洞 ID 编号
BUG-000112945
已提交
April 4, 2018
上次修改时间
June 5, 2024
适用范围
ArcGIS GIS Server
找到的版本
10.5.1
操作系统
Red Hat Enterprise Linux
操作系统版本
7.0 64 Bit
状态
Will Not Be Addressed
开发团队已考虑过该问题或请求,并决定不会解决该问题。 问题的“其他信息”部分可能包含进一步说明。
附加信息
By default, services support the SQL 92 standard when querying dates. This format is supported by all data sources on top of which the feature service can run. Format examples of this are as follows:
= DATE 'YYYY-MM-DD'
= TIMESTAMP 'YYYY-MM-DD HH:MI:SS'
The epoch date format (testdate = '1522676196000') is not standard and is not supported across all data sources – it happens to work with elastic but does not work with other sources.
For this reason we recommend using the SQL 92 format above.
解决办法
It is also possible to note that if the WHERE clause used a specific date stamp in the form of WHERE: testdate='2018-04-01', the query for the relational hosted feature layer returns the features correctly. Applications that use REST services to query date fields based on Epoch time only cannot use this workaround.