The 'By Attribute' mosaic method does not accept a date field.
上次发布: August 25, 2014ImageServer
漏洞 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.