Add decimal seperators

Price column in MS SQL is (decimal 18,1) is like:
image

I need to add dot and comma… like first row from down … It should shows 50,00
4 row value i need as 890,00
6 row value i need in 2950,00

Write now I’m using formula:
varTotalPrice.ToString.Insert(varTotalPrice.ToString.Length-2,“,”) and its adding comma after first 2 value like 50,00.

How to add on thousund… as my value shows like this for more then 5 digit.
image

@Ellen,

Use like this.

varTotalPrice.ToString("N2")

Thanks,
Ashok :slight_smile:

HI @Ellen

CurrentRow(0) = CurrentRow(0).ToString.Trim().Insert(CurrentRow(0).ToString.Trim.Length-2,",")

Please check the below flow:

Input:
image (1)

Output:

Regards

Ideally you should do it directly within the SQL Statement

When doing it afterwards we can do:
grafik

Line2 - default format
Line3 - Custom localized Format, feel free to adapt to your locals

I’m reading price from a txt file, which delivered without thousand seperators.
we are adding those direct to SQL so that I have the real value from txt file without doing changes in data.

I need to change this when I have to present so that way I need thousand seperator.

share with us

  • input file as text file (as it was mentioned reading text file)
  • expected output after the conversion

above statements are fuzzy to us:

Also we shared conversion option above

We also kindly ask to get with us into a straightforward discussion to get your case solved as quick as possible

image

image

its not correct result…

295000 is the value in Excel… means 2 thousand nine five hundrad and 00 cents…
and the answer I expect is 2.950,00.

2 zero from right is always is always Cents… and then amount start…

@Ellen

the given value 295000 is cobnverted into the expected value 2.950,00
with above given option:

grafik

You can do all RnD and Prototypes by your own within the immediate panel
Understanding the 6 Debugging Panels of UiPath in the easiest way possible! - News / Tutorials - UiPath Community Forum

When working with CSV Data, we dont use Excel. We use a Texteditor, when inspecting the data. Also we can check the result of Read Text file within the immediate panel and check the details

Kindly note:

but was not share with us.

We also mentioned:

in order to:

Before stepping more into a ping-pong

You used:


a comma

but we mentioned inserting a dot

1 Like

Thanks for the help @ppr … its working and It was due to that Comma I added.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.