Print Page | Close Window

rounding off

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=2788
Printed Date: 29 March 2026 at 7:40pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: rounding off
Posted By: Mattblack
Subject: rounding off
Date Posted: 17 May 2003 at 6:17am

Hi guys, ive got a column in my database with prices in.

When the page loads up, it calls the data and multiplies it by 1.175.  This sometimes leaves my with £10.757453093  which obviously u cant have.  How do i get it to round it off?

Cheers




Replies:
Posted By: MorningZ
Date Posted: 17 May 2003 at 6:25am
http://www.devguru.com/Technologies/vbscript/quickref/round.html - http://www.devguru.com/Technologies/vbscript/quickref/round.html

-------------
Contribute to the working anarchy we fondly call the Internet


Posted By: ljamal
Date Posted: 17 May 2003 at 8:27am
You could use the FormatCurrency function as well. http://www.devguru.com/Technologies/vbscript/quickref/formatcurrency.html - http://www.devguru.com/Technologies/vbscript/quickref/formatcurrency.html


Posted By: Gullanian
Date Posted: 17 May 2003 at 9:49am

Or in ASP use the round function,

round(INTEGER/LONG,NUMBEROFPLACES)

eg

round(cLng(rsCommon("databaseField")),2)

would round it to two decimal places




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net