ROUND ER function
The ROUND
function returns the specified number as a Real value after it has been rounded to the specified number of decimal places.
Syntax
ROUND (number, decimals)
Arguments
number
: Real
A numeric value that must be rounded.
decimals
: Integer
A numeric value that represents the number of decimal places.
Return values
Real
The resulting numeric value.
Usage notes
If the value of the decimals
argument is more than 0 (zero), the specified number is rounded to that many decimal places.
If the value of the decimals
argument is 0 (zero), the specified number is rounded to the nearest even integer.
If the value of the decimals
argument is less than 0 (zero), the specified number is rounded to the left of the decimal point.
Example 1
ROUND (1200.767, 2)
rounds to two decimal places and returns 1200.77.
Example 2
ROUND (1200.767, -3)
rounds to the nearest multiple of 1,000 and returns 1000.
Example 3
ROUND (1200.5, 0)
rounds to the nearest even integer and returns 1200, while ROUND (1201.5, 0)
does the same and returns 1202.