I have been using the same code for my field calculator for the last 7 years.

However 2 days ago it is giving a strange result.

The code is for changing a String number to Text. 1000 into 1 + 000 or 3000 into 3 + 000 or 5230 into 5 + 230 But now it makes a code 1 + 1000 or 3 + 1000. Very Strange. See attached image.

INT( [ET_STATION] /1000) & " + " & ROUND(((([ET_STATION] /1000) - INT( [ET_STATION] /1000))*1000),0)

I can not work out why it is doing this.

enter image description here enter image description here


A friend reached out to me and wrote a new code in Python for me. For me before I always left it as VB with the other code. Thanks for the post BERA.

str(int(!ET_STATION!/1000))+" + " + str(int(round((((!ET_STATION!/1000) - int(int(!ET_STATION!)/1000))*1000),1)))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.