Truncate function

TRUNC shortens a calculated value to a specified number of digits. Enter a separator (shown as a comma below) after the value.

  • If digit is positive, the value is truncated to that number of decimal places.
  • If digit is negative, the value is truncated to the left of the decimal point.

Syntax

TRUNC (value, digit)

Examples

TRUNC (1538.3518, 3) = 1538.3510
TRUNC (1538.3518, 2) = 1538.3500
TRUNC (1538.3518, 1) = 1538.3000
TRUNC (1538.3518, 0) = 1538.0000
TRUNC (1538.3518, -1) = 1530.0000
TRUNC (1538.3518, -2) = 1500.0000
TRUNC (1538.3518, -3) = 1000.0000