The DecimalToInteger function is a built-in function that converts Decimal d to an integer value.

In .NET stack, the function rounds the input using the round half to even method. In Java stack, and in an Aggregate expression the function truncates to the integer part of the input.

To check if the conversion is possible you can use the DecimalToIntegerValidate function.

Input parameters

d: Decimal Type

Output parameters

Integer Type

Examples

Usage

Development environment

Aggregate

DecimalToInteger( 134.2 )

134

134

DecimalToInteger( 134.5 )

134

134

DecimalToInteger( 133.5 )

134

133

DecimalToInteger( 134.7 )

135

134

DecimalToInteger( 134 )

134

134

DecimalToInteger( 12345678999.9 )

0

Arithmetic Overflow Error

See Also

DecimalToIntegerValidate Function | Available Conversion Functions to Integer | Available Built-in Functions