display fixed decimal digits

Discussion in 'ASP General' started by Bob Barrows, Jul 24, 2003.

  1. Bob Barrows

    Bob Barrows Guest

    Sure. Use the FormatNumber function.

    Bob Barrows
    Bei wrote:
    > I have variable, say "total". It can be an integer or floating number.
    >
    > No matter what value it stores (5 or 5.1 or 5.24), when I display it,
    > is there a way I can make it display it with fixed 2 decimal digits,
    > like 5.00?
    >
    > Thanks
     
    Bob Barrows, Jul 24, 2003
    #1
    1. Advertising

  2. Bob Barrows

    Bei Guest

    I have variable, say "total". It can be an integer or floating number.

    No matter what value it stores (5 or 5.1 or 5.24), when I display it, is
    there a way I can make it display it with fixed 2 decimal digits, like 5.00?

    Thanks
     
    Bei, Jul 24, 2003
    #2
    1. Advertising

  3. Bob Barrows

    Ray at Guest

    See the FormatNumber() function in your VB Script documentation, assuming
    you're using VB Script. If you do not have the documentation, download it
    here
    http://www.microsoft.com/downloads/...48-207D-4BE1-8A76-1C4099D7BBB9&displaylang=en,
    or view it online here
    http://msdn.microsoft.com/library/en-us/script56/html/vtoriVBScript.asp.

    Ray at work

    "Bei" <> wrote in message
    news:...
    > I have variable, say "total". It can be an integer or floating number.
    >
    > No matter what value it stores (5 or 5.1 or 5.24), when I display it, is
    > there a way I can make it display it with fixed 2 decimal digits, like

    5.00?
    >
    > Thanks
    >
    >
     
    Ray at, Jul 24, 2003
    #3
  4. Bob Barrows

    Bob Barrows Guest

    :)
    I'd like to, but our network server's clock is at fault here. They haven't
    fixed it yet ...

    Bob
    Ray at <%=sLocation%> wrote:
    > Hey Bob. Fix you're clock. Stop trying to move the end of the line.
    > :p
    >
    > Ray at work
    >
    > "Bob Barrows" <> wrote in message
    > news:...
    >> Sure. Use the FormatNumber function.
    >>
    >> Bob Barrows
    >> Bei wrote:
    >>> I have variable, say "total". It can be an integer or floating
    >>> number.
    >>>
    >>> No matter what value it stores (5 or 5.1 or 5.24), when I display
    >>> it, is there a way I can make it display it with fixed 2 decimal
    >>> digits, like 5.00?
    >>>
    >>> Thanks
     
    Bob Barrows, Jul 24, 2003
    #4
    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. Michel Rouzic
    Replies:
    18
    Views:
    1,608
    Malcolm
    Dec 10, 2005
  2. Kuljit

    Digits after the decimal point

    Kuljit, Feb 15, 2006, in forum: C Programming
    Replies:
    18
    Views:
    991
    Lew Pitcher
    Feb 24, 2006
  3. Ven
    Replies:
    3
    Views:
    1,368
  4. Gilbert Fine
    Replies:
    8
    Views:
    933
    Zentrader
    Aug 1, 2007
  5. David Garamond

    rounding to n decimal digits

    David Garamond, Jun 27, 2004, in forum: Ruby
    Replies:
    5
    Views:
    171
    David Garamond
    Jun 27, 2004
Loading...

Share This Page