llayla
1
I have a number of datatables containing account numbers. This account number must be tidied up before being processed. The rule is

- The number of characters must be 13 digits
- If less than 13 digits, 0 must be added so that the number of characters becomes 13

example:

a. 4000006201 == 10 digits, so it becomes 0004000006201

b. 1234000006201== 13 digits, no need to edit again

c. 400000622 == 9 digits, so it becomes 0000400000622

How to do this in studio. Anyone who can help me would greatly appreciate it. Thank you

Yoichi
(Yoichi)
2
Hi,

In this case, we can use PadLeft method as the following.

```
CurrentRow("Account Number") = CurrentRow("Account Number").ToString.PadLeft(13,"0"c)
```

Sample20230307-3L.zip (2.8 KB)

Regards,

1 Like

Hi @llayla

Give a try with

```
inputString.PadLeft(13, "0"c)
```

Regards

llayla
4
Wow, thank you so much @Yoichi , it really help me

1 Like

llayla
5
Thank you so much @fernando_zuluaga for your help

1 Like

system
(system)
Closed
6
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.