truncate()

Examples


The truncate() function returns the truncated value of a specified currency or variable currency field. The field can be truncated on either side of the decimal separator. The truncated digits are replaced with zeros.

Syntax

truncate(field_name, side, expression)

Parameters

field_name – A currency field or value containing the value to truncate.

side – A constant indicating on which side of the decimal separator you want to begin truncating:

[spacer]

Constant

Description

DECIMALRIGHT

Truncate the currency value from the specified number of places to the right of the decimal separator.

DECIMALLEFT

Truncate the currency value from the specified number of places left of the decimal separator.


expression – An integer indicating the number of places to the right or left of the decimal separator that the specified field will be truncated to. For currency fields, the allowable range to the right of the decimal separator is 0 to 5. For variable currency fields, it is 0 to 15.

Return value

Currency or variable currency


Documentation Feedback