Trim leading zeros from numbers stored as text

Hi,

How do I trim leading zeros from numbers stored as text?

(I have a feeling this is a very simple question, but I can’t get it).

I have a list of numbers, e.g. 0180, 0030.32, 0001, 0204, 4521, 0670.32, and I want to remove the leading zeros (sort of like the “trim” command, but for zeros).

While each number may have a different number of leading zeros, the total number of digits before the decimal is constant and known (in this example, 4).

Thanks

Three ways, depending on what you want:

1 Like

You can make the first one into a “portable” procedure

Ah, thank you.

In the meantime, I also worked on something.

Thanks again.