-1

I have a text file which contains seconds as denoted like this:

"4.20833333333333E-03"

My current approach to convert it to Double results in:

420833333333.333

Dim sNumber As String = "4.20833333333333E-03"
Dim d As Double = Double.Parse(sNumber)

How would I parse this correctly?

tmighty
  • 10,734
  • 21
  • 104
  • 218

1 Answers1

0

I think I got it:

Dim d As Double = Double.Parse(sNumber, System.Globalization.CultureInfo.InvariantCulture)
tmighty
  • 10,734
  • 21
  • 104
  • 218