"Stuart Nathan" <st***********@homecall.co.ukwrote in message
news:eK***************@TK2MSFTNGP02.phx.gbl...
Actually I wanted to convert £123,456.10 to 123456.1
I solved this by
r="£123,456.10"
r = r.Replace(CultureInfo.CurrentCulture.NumberFormat. CurrencySymbol, "")
' removes £
r = r.Replace(",", "") ' removes comma
Return Val(r)
Dim inValue As String = "£123,456.10"
Dim outValue As Double
Dim result As Boolean
' Try to parse the inValue and store the actual numeric value in
' outValue.
result = Double.TryParse( _
inValue, _
NumberStyles.Currency, _
NumberFormatInfo.CurrentInfo, _
outValue _
)
If result
Console.WriteLine("The parsed value is " & outValue.ToString())
Else
Console.WriteLine("Could not parse the value.")
End If
HTH :)
Mythran