subtraction questions

Discussion in 'ASP General' started by Joey Martin, Apr 8, 2004.

  1. Joey Martin

    Joey Martin Guest

    I have a numeric field in my database.
    How do I subtract?

    frequencypercent is a decimal and in this case is .20

    multiplierrate= 100 - rs_fees("classified_freq_percent")
     
    Joey Martin, Apr 8, 2004
    #1
    1. Advertising

  2. Joey Martin

    Joey Martin Guest

    well, kind of worked.

    The classified_freq_rate is actually .20
    Therefore it should be 1 (i stated 100 earlier but meant 1) -.20 and equals
    ..80
    But, using the cdbl, it shows 0.85

    Any ideas?

    "Peter Foti" <> wrote in message
    news:...
    > "Joey Martin" <> wrote in message
    > news:Ffgdc.2186$...
    > > I have a numeric field in my database.
    > > How do I subtract?
    > >
    > > frequencypercent is a decimal and in this case is .20
    > >
    > > multiplierrate= 100 - rs_fees("classified_freq_percent")

    >
    > Try:
    > multiplierrate= 100 - CDbl(rs_fees("classified_freq_percent"))
    >
    > Regards,
    > Peter Foti
    >
    >
    >
     
    Joey Martin, Apr 8, 2004
    #2
    1. Advertising

  3. Joey Martin

    Mark Schupp Guest

    See what is actually happening.

    Response.Write rs_fees("classified_freq_percent") & "<br>"
    Response.Write CDbl(rs_fees("classified_freq_percent")) & "<br>"
    Response.Write (100-CDbl(rs_fees("classified_freq_percent")) ) & "<br>"
    multiplierrate= 100 - rs_fees("classified_freq_percent")

    Response.Write multiplierrate & "<br>"

    --
    Mark Schupp
    Head of Development
    Integrity eLearning
    www.ielearning.com


    "Joey Martin" <> wrote in message
    news:xEhdc.585$...
    > well, kind of worked.
    >
    > The classified_freq_rate is actually .20
    > Therefore it should be 1 (i stated 100 earlier but meant 1) -.20 and

    equals
    > .80
    > But, using the cdbl, it shows 0.85
    >
    > Any ideas?
    >
    > "Peter Foti" <> wrote in message
    > news:...
    > > "Joey Martin" <> wrote in message
    > > news:Ffgdc.2186$...
    > > > I have a numeric field in my database.
    > > > How do I subtract?
    > > >
    > > > frequencypercent is a decimal and in this case is .20
    > > >
    > > > multiplierrate= 100 - rs_fees("classified_freq_percent")

    > >
    > > Try:
    > > multiplierrate= 100 - CDbl(rs_fees("classified_freq_percent"))
    > >
    > > Regards,
    > > Peter Foti
    > >
    > >
    > >

    >
    >
     
    Mark Schupp, Apr 9, 2004
    #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. Replies:
    3
    Views:
    15,995
    Eric Smith
    Jan 18, 2006
  2. August1
    Replies:
    4
    Views:
    353
    August1
    Sep 21, 2004
  3. Andy
    Replies:
    34
    Views:
    1,395
    Kelsey Bjarnason
    Jan 1, 2004
  4. Kevin C.

    Pointer subtraction

    Kevin C., May 7, 2004, in forum: C Programming
    Replies:
    5
    Views:
    429
  5. Joey Martin

    subtraction questions

    Joey Martin, Apr 8, 2004, in forum: ASP General
    Replies:
    0
    Views:
    101
    Joey Martin
    Apr 8, 2004
Loading...

Share This Page