Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiply number with decimal point

Status
Not open for further replies.

tyutghf

Technical User
Apr 12, 2008
258
0
0
GB
I have a price with two decimal places in a database i.e. 2.00, output this to the page and it displays 2.00 fine, but when I multiply this price by the quantity i.e 3 x 2.00 it is coming out as 600, when it should be 6.

Code:
strProductTotal = rs("quantity") * cint(rs("productprice"))

response.write strProductTotal 
response.write rs("productprice")

The first response will give as the example above 600, the second will write 2.00, so it is clearly ignoring the decimal point.

Any ideas why? Thanks.
 
Scrap this post, seems to be working now?!?!?!?!? Sme wierd firefox issue going on there, used another browser and works fine, shut down FF, opened back up and is ok
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top