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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

round off number

Status
Not open for further replies.

vasox56

Technical User
May 8, 2007
75
GB
hi.. i display the cost of a charge on my site using..

Code:
Dim mainprice, surcharge, sTempVar

sTempVar = "&#"

surcharge = mainprice * 0.05

DISPLAY IT USING THE FOLLOWING..

<%=sTempVar & "163;" & trim(surcharge)%>

sometimes the surcharge displays as £5.45

how can i round the surcharge to the nearest pound. (and if it is £5.50 for example then round it upwards)

thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top