TRUNC

Description

Truncates the given number to an integer.

Syntax

TRUNC ( number [, precision] )

Parameter Description
number Any value.
precision The number of decimal places allowed in the truncated number. Omitting this argument assumes a precision of 0.

Remarks

TRUNC removes the fractional part of a number to the specified precision without rounding the number.

Examples

This function returns 123.45:

TRUNC(123.456, 2)

This function returns 9800:

TRUNC(9899.435, -2)

See also

CEILING

FLOOR

INT

MOD

ROUND