RAD function: trunc

A RAD function that truncates the decimal digits of a number to a specified number of digits.

Function

trunc

Format

trunc(number,n)

Parameters

Parameter Data type Description
number Number The number to truncate.
n Number The number of decimal digits desired. The default value of n is zero (0).

Factors

  • The second parameter is not required. By default, the number passed is truncated to a whole number.
  • Negative and positive numbers are treated the same.
  • Character conversions are based on the value of the language parameter.

Examples

trunc(3.45,1)

After execution, 3.4 is returned.

trunc(3.44)

After execution, 3 is returned.

trunc('13:19:34')

After execution, 13:19:00 is returned.