MindFusion.Wpf Pack Programmer's Guide
TRUNC

Truncates the specified number to the specified number of digits.

Syntax  Copy Code

TRUNC( Number n, [Integer digits = 0] )  Number

Parameters

n
Required. The number to truncate.
digits
Optional. A number specifying the precision of the truncation. If omitted, digits is assumed to be 0.

Remarks

Truncates the n to the number of digits specified by digits. If digits is zero (or omitted), truncates to a decimal integer. If digits is positive, truncates to the specified number of decimal places. If digits is negative, truncates to the left of the decimal point. If digits is not integer, it is automatically truncated.

TRUNC and INT are similar in that both return integers. TRUNC removes the fractional part of the number. INT rounds the number down to the nearest integer based on the value of the fractional part of the number. INT and TRUNC are different only when using negative numbers: TRUNC(-4.3) returns -4, but =INT(-4.3) returns -5 because -5 is the lower number.

See Also

Function Reference
CEILING Function
FLOOR Function
INT Function
MOD Function
ROUND Function