Skip to main content

Hi,

 

I have some field (ID), but the values sometimes have one, two, three...digits. There is one attribute with number of the digits that previous may have. For example the value (ID) is 10 and the number of digits may have 5, so the value is 00010. If the value (ID) is 1555, the value become 01555.

 

How to put 0 in the left to complete the digits of fields?

 

How do that?

 

Thank´s

 

Use the @PadLeft function in an AttributeManager or AttributeCreator, of use the StringPadder transformer.

PadLeft


Or use the StringFormatter, with e.g. "05s" as the format string.


Use the @PadLeft function in an AttributeManager or AttributeCreator, of use the StringPadder transformer.

PadLeft

Very Good, thank´s for your attention!


Reply