This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
Early bird tickets for Inspire 2023 are now available! Discounted pricing closes on January 31st. Save your spot!
Dear all,
I have a very basic question.
Imagine I have a list consisting of many entries with integer values of different number of digits, sometimes 5 sometimes 7. In the end I want to have a string with 10 digits/chars. That means if an entry has 5 digit number then 5 times zero should be added in front of that integer, if it has 7 digit number then 3 times zero.
Obviously, I can do this with a giant if else loop but I would very much appreciate an elegant way that will save me some time!
Best,
Atamert
Solved! Go to Solution.
You can use the Formula Tool,
padleft([Field1], 10, '0')
You would need to make sure [Field1] is a string by either using the Select Tool or ToString([Field1]).
Any way we can use this for a double data type? Says for string only.