AnsweredAssumed Answered

Calculating field, pad zeros to a max field width of 6

Question asked by mimiller on May 2, 2012
Latest reply on May 3, 2012 by mimiller
I am trying to calculate a field value so that I pad 0's to the existing values to a max width of 6 chars.

Being a python newbie, I'm a little shaky with coding. I've started with the following code and getting nowhere. Any help/direction is appreciated

arcpy.CalculateField_management(outCrash, "Segment_Code", !Segment_Code!.ljust(!Segment_Code!,6,0), "PYTHON")


Michael Miller

Outcomes