Concatenating A Double

Discussion in 'ASP .Net' started by Ron, Jul 2, 2003.

  1. Ron

    Ron Guest

    Can anyone tell me how I can remove a few zero's from the end of a double?

    For example, the number I have is 55.0000, the number I need is 55.00.

    How can I go about trimming the zeros?

    Thanks,

    Ron
    Ron, Jul 2, 2003
    #1
    1. Advertising

  2. Steve C. Orr, MCSD, Jul 2, 2003
    #2
    1. Advertising

  3. Dim dblValue As Double = 55.0000

    Convert.ToDecimal(dblValue)

    or

    FormatNumber(dblValue, 2)

    The second parameter specifies the number of digits to the right of the
    decimal place that should be displayed.

    "Ron" <> wrote in message
    news:bdvfue$...
    > Can anyone tell me how I can remove a few zero's from the end of a double?
    >
    > For example, the number I have is 55.0000, the number I need is 55.00.
    >
    > How can I go about trimming the zeros?
    >
    > Thanks,
    >
    > Ron
    >
    >
    Scott Schluer, Jul 2, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Stan Horwitz
    Replies:
    2
    Views:
    2,737
    Stan Horwitz
    Feb 15, 2006
  2. Gary Morrison
    Replies:
    5
    Views:
    2,563
    Gary Morrison
    Mar 28, 2006
  3. Ani
    Replies:
    1
    Views:
    385
    Kevin Spencer
    Oct 27, 2003
  4. Craig
    Replies:
    2
    Views:
    369
    Craig
    Oct 22, 2004
  5. Sydex
    Replies:
    12
    Views:
    6,472
    Victor Bazarov
    Feb 17, 2005
Loading...

Share This Page