Convert from String to Double

  • Thread starter Thread starter Peter Newman
  • Start date Start date
P

Peter Newman

Previously posted in the wrong group

I writing an app to read a text file and need to convert a string into a
double.

ie "00000001234" into 12.34

It is part of a translator code the line in question =

Double.Parse(Right("00000000000" & Mid(ImportLine, 38, 11),
11)), _

where Mid(ImportLine, 38, 11) = "00000001234"
 
Peter said:
I writing an app to read a text file and need to convert a string
into a double.

ie "00000001234" into 12.34

It is part of a translator code the line in question =

Double.Parse(Right("00000000000" & Mid(ImportLine, 38,
11), 11)), _

where Mid(ImportLine, 38, 11) = "00000001234"

Double.Parse(Mid(ImportLine, 38, 11))*0.01

Or is there something you're not telling us about the string?

Andrew
 
Peter,

In my idea does this work in every version of VB later then version 3

\\\
Dim x As Double = CDbl("00000001234") * 0.01
///

This is complete correct Visual Basic and does not need any Net part even in
language version 9 (or in future 10)

Cor
 
Back
Top