laptop and a wrench

漏洞

The 'By Attribute' mosaic method does not accept a date field.

上次发布: August 25, 2014 ImageServer
漏洞 ID 编号 NIM041426
已提交January 9, 2009
上次修改时间June 5, 2024
适用范围ImageServer
找到的版本9.2
操作系统Windows OS
操作系统版本2003
状态Will Not Be Addressed

附加信息

No Public Explanation

解决办法

Use the following script in the field calculator to convert the dates to the ISO date format (e.g. yyyymmdd), which can be stored in a long integer field:1. Create a long integer numeric field through the 'Fields Properties' section of the 'Service Properties' dialog.2. Run the 'Build' operation with the 'Extract metadata fields' option enabled.3. Open the service table and right-click on the newly added numeric field and select 'Field Calculator'.4. Select Advanced.5. Enter the following VBA code in the box marked 'Pre-Logic VBA Script Code', and modify the d4 dimensioned variable to match the desired date field:dim outDate as longdim outDateAsStr as string dim d2,d3 as stringdim nd1,nd2,nd3 as integer dim d4 as dated4 = [enter_date_field]nd1 = DatePart ( "yyyy" , d4 ) nd2 = DatePart ( "m" , d4 ) nd3 = DatePart ( "d" , d4 )'Add a leading zero to numbers less than 10 in keeping with the ISO date format.if nd2 < 10 then d2 = "0" & str(nd2)else d2 = str(nd2)end if 'Add a leading zero to numbers less than 10 in keeping with the ISO date format.if nd3 < 10 then d3 = "0" & str(nd3)else d3 = str(nd3)end if outDateAsStr = str(nd1) & d2 & d3outdate = val(outDateAsStr)6. Type the variable outdate into the next text box. Do not enclose it in quotes or brackets.7. Run the calculation to populate the numeric field.

重现步骤

漏洞 ID: NIM041426

软件:

  • ImageServer

当漏洞状态发生变化时获得通知

下载 Esri 支持应用程序

发现关于本主题的更多内容

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项