3.2.57. TRUNC(number[,length])Returns number truncated to the number of decimals specified by length. Length defaults to 0, that is return an whole number with no decimal part. The decimal point will only be present if the is a non-empty decimal part, i.e. length is non-zero. The number will always be returned in simple form, never exponential form, no matter what the current settings of NUMERIC might be. If length specifies more decimals than number has, extra zeros are appended. If length specifies less decimals than number has, the number is truncated. Note that number is never rounded, except for the rounding that might take place during normalization. TRUNC(12.34) –> ‘12’ TRUNC(12.99) –> ‘12’ TRUNC(12.34, 4) –> ‘12.3400’ TRUNC(12.3456, 2) –> ‘12.34’

PREV NEXT