<< Click to Display Table of Contents >> Navigation: Available Functions > Int() |
Syntax
Int( <NumericValue> )
Purpose
To remove the decimal part of a numeric value.
Parameters
<NumericValue> is the number you wish to strip the decimal places from.
Returns
Int() returns <NumericValue> without any decimal places.
Usage
In DonorQuest, the Int() function is basically used to remove cents from dollar amounts for certain reports. However, it may also be applied to calculations that result in long decimal values if the accuracy of this decimal is not desired. Note that Int() operates by removing--not rounding--all digits to the right of the decimal point.
Example
The following examples illustrate Int():
CALL |
RESULT |
---|---|
Int( 100.00 ) |
Result: 100 |
Int( .5 ) |
Result: 0 |
Int( -100.75 ) |
Result: -100 |