How to convert percent to double? 
Author Message
 How to convert percent to double?

Hi Nathaniel,

Try the following code:

        Dim d As Double = 0.5674
        Dim str As String = Format(d, "p")
        Dim newD As Double
        newD = Double.Parse(str.Substring(0, str.Length - 2)) / 100

Hope this helps!
Bharat Patel
Microsoft, Visual Basic .NET

This posting is provided "AS IS" with no warranties, and confers no rights.
Please reply to newsgroups only. Thanks.              

Sat, 29 Jan 2005 06:46:35 GMT  
 [ 1 post ] 

 Relevant Pages 

1. converting string containing binary double to double

2. PRB: converting SINGLE field to DOUBLE

3. converting string fractions to double or decimals

4. convert double or decimal to datetime

5. Problem about converting from double to string

6. Single Quotes converted to double Single Quotes

7. How to convert string to double or int

8. Convert String to double

9. converting to / from double

10. Converting a String to a Double

11. converting double from old basic format to VB

12. convert Pascal real to double or single


Powered by phpBB® Forum Software