Hi All,
Please suggest an idea to achieve below operation
A= “592,20”
B=“99,20”
and my result should be C=“691,40”
Hi All,
Please suggest an idea to achieve below operation
A= “592,20”
B=“99,20”
and my result should be C=“691,40”
You can achieve this in UiPath by parsing the strings into numerical values, performing the addition, and then formatting the result back into the desired string format.
Here’s how you can do it:
A = A.Replace(“,”, “.”)
B = B.Replace(“,”, “.”)
A_Double = CDbl(A)
B_Double = CDbl(B)
C_Double = A_Double + B_Double
C = C_Double.ToString.Replace(“.”, “,”)
Now C will be “691,40” as expected.
LLM helped me to write this but it’s validated by me.
@Ajith3 , are you asking how to add 2 numbers?
@sudster , yes but my inputs and output should be in string
Hi @Ajith3
Please try with this
A_Decimal = Convert.ToDecimal(A.Replace(",","."))
B_Decimal =Convert.ToDecimal(B.Replace(",","."))
C= (A_Decimal+B_Decimal).ToString.Replace(".",",")
All you need is to set the CurrentCulture to one of the European countries.


Edit: To fix some failure modes. Sorry, I had to edit multiple times because as I was testing, I found more issues.
Note: This solution will give you 2 decimal places in the output in all cases. If this is not a requirement, one of the other solutions will be easier.
@ashokkarale could you please help me with this error ?
I have downloaded the xaml, which you sent.
Here is full project. I guess there could be package dependency which is resulting in this error.
Extract and use this project.
TestProject.zip (46.2 KB)
Format value activity accepting only ‘Generic Value’.
Thanks for your suggestion. Its working now.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.