How to identity the thounsands separator number?

Dears
A question for string to number transfer, why below result is “1”, it should be “1551.00”. Looks like the Uipath cannot identify the string with thousands separator number “1,551.00”, how to solve the problem?
Thanks.

  • Option 1: Assign temptest = Val(SAP_Netprice.replace(",",""))
  • Option 2: Assign temptest(as decimal) = Convert.toDecimal(SAP_Netprice)
  • Option 3: Assign temptest(as double) = Convert.toDouble(SAP_Netprice)
2 Likes

Hello Nalashaa, thanks. Option1 is valid, option 2 and 3 doesn’t work,
we also find another solution: Assign temptest = Cdbl(SAP_Netprice)

1 Like

can you please print SAP_Netprice.?

if that is coming properly as 1,551.00 you can use Convert.toDouble(SAP_Netprice) and while you printing in message box again you should convert that back to string.