Difference between revisions of "Manuals/calci/TRUNC"
Jump to navigation
Jump to search
(Created page with "<div id="16SpaceContent" align="left"><div class="ZEditBox" align="justify"> Syntax </div></div> ---- <div id="4SpaceContent" align="left"><div class="ZEditBox" align=...") |
|||
Line 1: | Line 1: | ||
− | + | =TRUNC(number, digits)= | |
− | + | *Where 'number' is the number to truncate and | |
+ | *'digits' is a number specifying the number of decimal places to be displayed in the result. | ||
− | + | TRUNC() truncates a number to specified number of digits. | |
− | |||
− | |||
− | + | == Description == | |
− | + | TRUNC(number, digits) | |
− | |||
− | |||
− | + | For Example, | |
− | + | 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 -45'' whereas | |
− | - | + | TRUNC(-45.1) ''returns -46'' |
− | |||
− | - | ||
− | |||
− | + | == Examples == | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 15:46, 24 November 2013
TRUNC(number, digits)
- Where 'number' is the number to truncate and
- 'digits' is a number specifying the number of decimal places to be displayed in the result.
TRUNC() truncates a number to specified number of digits.
Description
TRUNC(number, digits)
For Example,
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 -45 whereas TRUNC(-45.1) returns -46