Canvertion text to Number

i need to Convert TextVal=“4 617 62” into DblVal= 4,617.62

are last two digits are always the decimal ones?

If yes then
try this
(test.Trim.Replace(" “,”“)).Substring(0,test.Trim.Replace(” “,”“).Length-2)+”.“+(test.Trim.Replace(” “,”“)).Substring(test.Trim.Replace(” “,”").Length-2)

1 Like

Hi @Noor_Shaik,

Try below code methods:

If you want convert string to doudle

Double Variable = Double.Parse(String Variable)

Or

Using vb. Net

Dim integerNumber As Integer
integerNumber = 17843
Console.WriteLine(integerNumber.ToString("F", CultureInfo.InvariantCulture))
' Displays 17843.00

Or

String.Format(“{0:0.00}”, row(Columnname))

Or

double.Parse(string, System.Globalization.CultureInfo.InvariantCulture)

Hope this helps, if it works mark as solution.

Thanks,
Neelima.

@ImPratham45 Thank you

Most Welcome :relaxed:
Happy Automation!!!

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