• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » How to Format Leading Zeros for Numeric.sequence ?

#1 2010-01-13 23:47:40

andybrown
Member
Registered: 2008-05-20
Posts: 107

How to Format Leading Zeros for Numeric.sequence ?

Tags: [format, string, zero]

I need to output Numeric.sequence with a specified number of digits. If the numeric value is less than the number of digits, I need leading zeros to be inserted... If I need 5 digits,

Ex: "12" = "00012"
Ex: "12392" = "12392"
Ex: "9" = "00009"

Any easy way to do this in a tMap?

Offline

#2 2010-01-14 00:23:41

tnewman
Member
Company: Lunexa
Registered: 2008-11-15
Posts: 194
Website

Re: How to Format Leading Zeros for Numeric.sequence ?

Hi,

Try having a Var expresssion with 'String.format("%05d", yourinputfield); '


------------------
Talend Version - TIS 4.1.2
Generated Code - Java
OS - WinXP SP3 / Linux

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » How to Format Leading Zeros for Numeric.sequence ?

Board footer

Powered by FluxBB