VBScript Round Function
Complete VBScript Reference Manual
The Round function rounds a number.
Syntax
Round(expression[,numdecimalplaces])
| Parameters | Description |
|---|---|
| expression | Required. The numeric expression to be rounded. |
| numdecimalplaces | Optional. Specifies how many digits to the right of the decimal point to round to. The default is 0. |
Example
Example 1
The example above produces the following output:
24
25
Try it »
Example 2
How to round a number to 2 decimal places:
The example above produces the following output:
24.13
Try it »
Complete VBScript Reference Manual