laptop and a wrench

Bug

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

Last Published: August 25, 2014 ImageServer
Bug ID Number NIM041426
SubmittedJanuary 9, 2009
Last ModifiedJune 5, 2024
Applies toImageServer
Version found9.2
Operating SystemWindows OS
Operating System Version2003
StatusWill Not Be Addressed

Additional Information

No Public Explanation

Workaround

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.

Steps to Reproduce

Bug ID: NIM041426

Software:

  • ImageServer

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options