DriveWorks Pro 15: Trunc [send feedback...]

Trunc

This function truncates a number to a given integer.

Syntax

TRUNC( [ Number], [ Number of Digits] )

Number is the number, or reference to a number, that you want to truncate.

Number of Digits is the number of decimal places you require.

If the number of digits is set to 0 or left blank, the TRUNC function, when calculated, will return the only integer part of the number.

If the number of digits has a value greater than 0, then the TRUNC function, when calculated, will return the number rounded to the specified number of digits.

Examples

Rule

Meaning
TRUNC(LengthTextBoxReturn/2, 2)The return value from the LengthTextBox is divided by 2 and the result is rounded to 2 decimal places.

Example Outcomes

LengthTextBoxReturn/2 Value

Number of Digits

Result of the TRUNC function

17.482976217.48
134.7457340134
348.56873348.568

Table of Contents