|
| |
|
|
kitty6
Posts: 153 Joined: 10/15/2005 Status: offline
|
rounding - 8/31/2007 8:17:22
The following code displays a value of $419.58 Response.write FormatCurrency( cLng(expmyob1) * (cLng(sale41002) / cLng(salestotal) )) I then I create the variable: cpmyob1 <%cpmyob1 = FormatCurrency(cLng(expmyob1) * (cLng(sale41002) / cLng(salestotal) )) %> The following code displays a value of $308.53 Response.write(FormatCurrency(FP_FieldVal(fp_rs,"myob2")*.10)) I then I create a second variable: cpmyob2 <%cpmyob2 = FormatCurrency((FP_FieldVal(fp_rs,"myob2")*.10)) %> Here is my problem. The two values display properly but when add the two varibles together with the following code, it rounds it? <% response.write FormatCurrency( cLng(cpmyob1) + cLng(cpmyob2)) %> The total value should display $728.11 but now it displays $729.00? What am I doing wrong? Thanks.
|
|
|
|
rdouglass
Posts: 9280 From: Biddeford, ME USA Status: offline
|
RE: rounding - 8/31/2007 8:47:03
Try changing 'clng()' to 'cbbl()' as in: cDbl(cpmyob1) Hope it helps.
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|