logo
g Text Version
Beauty & Self
Books & Music
Career
Computers
Education
Family
Food & Wine
Health & Fitness
Hobbies & Crafts
Home & Garden
Money
News & Politics
Relationships
Religion & Spirituality
Sports
Travel & Culture
TV & Movies

dailyclick
Bored? Games!
Nutrition
Postcards
Take a Quiz
Rate My Photo

new
Action Movies
Bible Basics
Houseplants
Romance Movies
Creativity
Family Travel
Southwest USA


dailyclick
All times in EST

Full Schedule
g
g ASP Site

BellaOnline's ASP Editor

g

ASP Round Function


The round function in ASP lets you round a number off to a set number of decimal points. This is great, for example, to round dollar amounts off to the nearest cents.

All you do is use the Round command, and provide the number of decimal points to round it to. For example, if you have a number and want it to have only 2 decimals points so it looks like a dollar value, you would say -

Response.write "Your final total is: $" & Round(CartAmt,2) & " Dollars."

If you want to estimate the number of visitors you get in a given day based on your monthly traffic, you don't want to end up with partial visitors! So in this case you'd round to zero decimal points -

response.write "I get about " & Round(MonthVisit,0) & " visitors each day."

Numeric ASP Functions

Introduction to ASP Ebook

Download this ebook to get everything you need to know about learning ASP - from a step by step tutorial to function lists, sample code, common errors and solutions, and much more! 101 pages.
Add ASP+Round+Function to Twitter Add ASP+Round+Function to Facebook Add ASP+Round+Function to MySpace Add ASP+Round+Function to Del.icio.us Digg ASP+Round+Function Add ASP+Round+Function to Yahoo My Web Add ASP+Round+Function to Google Bookmarks Add ASP+Round+Function to Stumbleupon Add ASP+Round+Function to Reddit




RSS | Editor's Picks Articles | Top Ten Articles | Previous Features | Site Map


For FREE email updates, subscribe to the ASP Newsletter


Past Issues


print
Printer Friendly
bookmark
Bookmark
tell friend
Tell a Friend
forum
Forum
email
Email Editor


Content copyright © 2014 by Lisa Shea. All rights reserved.
This content was written by Lisa Shea. If you wish to use this content in any manner, you need written permission. Contact Lisa Shea for details.

g


g features
Archives | Site Map

forum
Forum
email
Contact

Past Issues
memberscenter


vote
Poetry
Daily
Weekly
Monthly
Less than Monthly



BellaOnline on Facebook
g


| About BellaOnline | Privacy Policy | Advertising | Become an Editor |
Website copyright © 2014 Minerva WebWorks LLC. All rights reserved.


BellaOnline Editor