Need to get the decimal part of a number

Discussion in 'ASP General' started by Ricardo, Jun 30, 2003.

  1. Ricardo

    Ricardo Guest

    Hi.

    How can I -from an ASP page- get the decimal part of a
    number ?

    Thanks in advance for all your help.
     
    Ricardo, Jun 30, 2003
    #1
    1. Advertising

  2. Ricardo

    Ray at Guest

    DecimalPart = CDbl(TheNumber)-CLng(TheNumber)

    If you don't care about the sign stick Abs() around the result. And I'm
    assuming you want the decimal value, i.e. if the number is 2, you want .0 as
    a result.

    Ray at home

    "Ricardo" <> wrote in message
    news:032501c33f50$3801ee10$...
    > Hi.
    >
    > How can I -from an ASP page- get the decimal part of a
    > number ?
    >
    > Thanks in advance for all your help.
     
    Ray at, Jun 30, 2003
    #2
    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. makok
    Replies:
    1
    Views:
    6,983
    Anders Hellerup Madsen
    Feb 23, 2004
  2. muss
    Replies:
    13
    Views:
    730
    Vladimir S. Oka
    Mar 27, 2006
  3. Replies:
    14
    Views:
    1,069
    Simon Biber
    Nov 16, 2006
  4. Oscar Lok
    Replies:
    1
    Views:
    194
    David Kastrup
    Nov 19, 2006
  5. Fei Liu
    Replies:
    21
    Views:
    2,483
    John Bokma
    Dec 16, 2006
Loading...

Share This Page