How to change number format to ###.####.####.##

I have used a “get text” activity that is entered in a column in Excel, e.g. → 1112222333344, however I want to change the format to 111.2222.3333.44. How can I do that? Ideally at the end the format of the column should be “Text”.

Hi

Once after getting the text with a GET TEXT activity and saving it as a string variable named strinput
Then use a assign activity like this

strinput = strinput.ToString(@"#.###.###.##")

For more ideas refer this doc

Cheers @maria.mitova

Hi,

Can you try the following expression?

Decimal.Parse(yourString).ToString("###\.####\.####\.##")

Or the following will also work.

yourString.Insert(11,".").Insert(7,".").Insert(3,".")

System.Text.RegularExpressions.Regex.Replace(yourString,"(\d{3})(\d{4})(\d{4})","$1.$2.$3.")

Edit: If you use StudioX, the following will work. (please use advanced editor)

img20211107-3

Regards,

1 Like

Thank you!