locked
How to convert Euro Currency to Double cdbl RRS feed

  • Question

  • User-1599366522 posted

    When i use cdbl for US currency $1,200.89 it shows as follows 1200.89

     

    when i use the same technik with Euro currency for this: 1.200,89  it gives me error saying wrong format.

    Please how to convert a Euro currency to double.

    Thank you very much for the information. 

     

     

     

    Tuesday, January 23, 2007 10:40 PM

Answers

  • User-503940700 posted

    Hi,

    Try this:

    System.Globalization.CultureInfo ci = new System.Globalization.CultureInfo("es-ES");
    string h = "1.200,89";
    double d = double.Parse(h,ci);

    Hope this helps,

    Vivek

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, January 24, 2007 1:27 AM

All replies

  • User-503940700 posted

    Hi,

    Try this:

    System.Globalization.CultureInfo ci = new System.Globalization.CultureInfo("es-ES");
    string h = "1.200,89";
    double d = double.Parse(h,ci);

    Hope this helps,

    Vivek

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, January 24, 2007 1:27 AM
  • User120278387 posted
    Thanks Vivek. it worked. can you please tell me how to convert this(189.542.679,00 € ) to double.
    Saturday, February 3, 2007 7:22 AM
  • User-503940700 posted

    The code I mentioned earlier should work. Let me know if it is not working.

    Vivek

    Saturday, February 3, 2007 11:39 AM