3 Replies Latest reply: May 15, 2014 9:53 AM by OJGraf _

# Str()

Hello,

who can I get a "0" infront of a number?

Example:

The number is:

10000067, the result should be 010000067

Greetings

Oli

• ###### Str()

Oli

You will have to convert it to a string to get a zero on the front, if it is a number it will remove the leading zero.

If you need to you can simply add a zero to the string by using

"0"+Trim(Str(YourNumericField))

You need the Trim to stop the Str function from adding a blank.

Regards

Nigel

• ###### Str()

Oli,

Oli,

Your STR() function should (I think) allow you to specify the size of the output string in terms of number of characters and the 'fill' character to be used.

This or Nigel's solution should work for you.

Good luck.

Grant

Originally posted by OJGraf:

Hello,

who can I get a "0" infront of a number?

Example:

The number is:

10000067, the result should be 010000067

Greetings

Oli /b[/quote]

• ###### Str()

thanks fot the solution for the "0". It woks very good!!