Rounds a number to the specified number of decimal places.
Round ( x, n )
Argument |
Description |
---|---|
x |
The number you want to round. |
n |
The number of decimal places to which you want to round x. Valid values are 0 through 30. |
Decimal. Returns x rounded to the specified number of decimal places if it succeeds, and null if it fails or if any argument’s value is null.
This statement returns 9.62:
Round(9.624, 2)
This statement returns 9.63:
Round(9.625, 2)
This statement returns 9.600:
Round(9.6, 3)
This statement returns –9.63:
Round(-9.625, 2)
This statement returns null:
Round(-9.625, -1)