One Star

tMap: Padding Number.

Bonjour,
I'm no Java specialist.
I would like to have my Numeric.sequence in the following fix format: "S00000000" (with padding "0").
sequence 0 -> S00000000
sequence 1 -> S00000001
..
sequence 111 -> S00000111
etc.
I can convert a number to a string but I cannot make it in this precise format.
Thanks.
PM
2 REPLIES
Employee

Re: tMap: Padding Number.

Try this:
"S" + new java.text.DecimalFormat("00000000").format(111)
One Star

Re: tMap: Padding Number.

It works now.
This also teaches me on how to use java within the Expression Editor.
Many thanks.
PM