Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
tmumaw
Specialist II
Specialist II

Fiscal Period (5 not 005)

Group need alittle help.  Take a look at the statement  below:

LET vFisPd = if(len('$(vFisPd)' - 1) < 2, '00', '0') & '$(vFisPd)' - 1; 

vFisPd is equal to 006, but my final outcome is 5 and should be 005. Any ideas?

Thanks

1 Solution

Accepted Solutions
Anonymous
Not applicable

If you want the result to be fixed length (three digits), you can use formating:

num(<whatever>, '000')

Regards,

Michael

View solution in original post

2 Replies
Not applicable

Hi,

try with the function Concat()

LET vFisPd = if(len('$(vFisPd)' - 1) < 2, Concat('00'& '$(vFisPd)' - 1),Concat('0'& '$(vFisPd)' - 1)

Rebeca

Anonymous
Not applicable

If you want the result to be fixed length (three digits), you can use formating:

num(<whatever>, '000')

Regards,

Michael