- Where 'Number' is the number to truncate and
- 'Number_Digits' is a number specifying the number of decimal places to be displayed in the result.
- TRUNC(), truncates a number to an integer.
TRUNC(56.6878,2) returns 56.68 as a result.
- If digits is not specified, Calci considers it as 0.
- TRUNC() and INT() functions are somewhat similar. TRUNC() removes the fractional part of the number, where as INT() rounds the number down to nearest integer.
- INT() and TRUNC() work differently with negative numbers.
INT(-45.1) returns -46 whereas
TRUNC(-45.1) returns -45
- TRUNC() can be combined with other functions as below -
TRUNC(SUM(3.4545,6.7878),2) returns 10.24 as a result.
- If the input is non-numeric, Calci displays an error message.