Velocity Reviews > subtraction questions

# subtraction questions

Joey Martin
Guest
Posts: n/a

 04-08-2004
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
Guest
Posts: n/a

 04-08-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> "Joey Martin" <(E-Mail Removed)> wrote in message
> news:Ffgdc.2186\$(E-Mail Removed)...
> > 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
Guest
Posts: n/a

 04-09-2004
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
Integrity eLearning
www.ielearning.com

"Joey Martin" <(E-Mail Removed)> wrote in message
newsEhdc.585\$(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > "Joey Martin" <(E-Mail Removed)> wrote in message
> > news:Ffgdc.2186\$(E-Mail Removed)...
> > > 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
> >
> >
> >

>
>