Solved! Go to Solution.
in the Python script like:
"{"+!field![:2]+"-"+!field![2:6]+"-"+!field![6:]+"}"
it works good in attribute table!
By the way, !field! is string.
I am using ArcPy 10.2 CalculateField management to format a field from an existing field.
e.g. from 123456789 to {12-3456-789}
It works good using attribute table, but it shows "syntax error" when using python scripting.
Anyone has any solution?
Thanks.
What does the calculation look like in the Python script?
in the Python script like:
"{"+!field![:2]+"-"+!field![2:6]+"-"+!field![6:]+"}"
it works good in attribute table!
By the way, !field! is string.