AnaFyr
11-18-2003, 03:18 PM
Trying to find a way to get a integer variable to return only 2 decimal places.
I understand one can force a variable with conversion agents like; CCur or CDbl. Is this how I need to do it?
Now I get this: $234.87654
I want this: $234.87
A copy of my code and how I'm using it:
!COMMENT--HERE ARE SOME OF MY VARIABLES
Dim MultipliedTaxes
MultipliedTaxes = (TotalProductsPrice + TotalTax)
Dim FinalPriceWithDelivery
FinalPriceWithDelivery = (MultipliedTaxes + AcquiredDeliveryFee)
!COMMENT--HERE I'M RETURNING VALUES TO THE PAGE
Response.Write "<TR ALIGN='center' VALIGN='middle'><TD COLSPAN='2'><B>FinalTotal:</B></TD><TD
BGCOLOR='#E0E0E0'><B><FONT COLOR='#CC0000'>$" & FinalPriceWithDelivery & "</FONT></B></TD></TR></TABLE><P><BR>"
Anyone?
I understand one can force a variable with conversion agents like; CCur or CDbl. Is this how I need to do it?
Now I get this: $234.87654
I want this: $234.87
A copy of my code and how I'm using it:
!COMMENT--HERE ARE SOME OF MY VARIABLES
Dim MultipliedTaxes
MultipliedTaxes = (TotalProductsPrice + TotalTax)
Dim FinalPriceWithDelivery
FinalPriceWithDelivery = (MultipliedTaxes + AcquiredDeliveryFee)
!COMMENT--HERE I'M RETURNING VALUES TO THE PAGE
Response.Write "<TR ALIGN='center' VALIGN='middle'><TD COLSPAN='2'><B>FinalTotal:</B></TD><TD
BGCOLOR='#E0E0E0'><B><FONT COLOR='#CC0000'>$" & FinalPriceWithDelivery & "</FONT></B></TD></TR></TABLE><P><BR>"
Anyone?