[GIS] Adding “0” to front of all values in column using ArcGIS Field Calculator

arcgis-10.1arcgis-desktopfield-calculatorleading zero

In ArcInfo 10.1 I have a table for each state with Zip Code values. The 5-digit Zip Codes that start with "0" have been reduced to 4-digits. I cannot figure out how to add a "0" to the front of all the values in the table. Tried a number of field-calculations but just can't seem to get it right.

Best Answer

As Brian mentioned you will need to store the data in a text field. Then the field calculation is: right("00000" + [Existing_ZIP_CODE_FIELD],5)

this will ensure you have all of the necessary leading 0s up to 5 characters.