ROUND Function

Rounds a number to the nearest number with the specified decimal places.

Category: Mathematical
Returned data type: Real

Syntax

ROUND(argument <, decimals>)

Required Argument

argument

a value with a data type of real that can be specified as a numeric constant, field name, or expression

Optional Argument

decimals

specifies a numeric constant, field name, or expression that indicates the number of decimal places to provide in the result of the rounding operation. A positive value for decimals is used to round to the right of the decimal point. A negative value is used to the left of the decimal point

Default: 0

Example

x = round(1.2345,1)

// outputs 1.2

 

x = round(1.449,2)

// outputs 1.45

 

x = round(9.8765,1)

// outputs 9.9

 

x = round(9.8765)

// outputs 10