Truncate Function
Description:
Truncate a value down (towards minus infinity) to a specified number of decimal places.
The functions
Truncate
and RoundDown
are equivalent for non-negative numbers. Returns:
Number
Parameters:
Parameter | Data Type | Description |
|---|---|---|
1 | Number | The number to be rounded. |
2 | Whole Number | The decimal precision. |
Examples:
When using functions inside a field, remember the field brackets:
{Truncate(TotalCost, 2)}
Expression | Result |
|---|---|
Truncate( 6.056, 3 ) | 6.056 |
Truncate( 6.056, 2 ) | 6.05 |
Truncate( 6.056, 1 ) | 6 |