TRUNCATE function
- Last Updated: January 16, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
Truncates a decimal expression to a specified number of decimal places, returning a decimal value.
Syntax
|
- expression
-
A decimal expression that you want to truncate.
- decimal-places
-
A non-negative integer expression that indicates the number of decimal places for a truncated expression.
Example
This
procedure doubles each Customer's CreditLimit and
then truncates that value before rounding it to the nearest $1000:
r-trunc.p
|
Notes
You can use the TRUNCATE function to treat division as integer division. For example, i = TRUNCATE (x / y, 0).