The DecimalToLongInteger function is a built-in function that converts Decimal d to a Long Integer value. The function rounds the input using the round half to even method, and in an Aggregate expression the function truncates to the integer part of the input.

If d is outside the boundaries of the Long Integer values, the function will return the Long Integer default value. To check if the conversion is possible you can use the DecimalToLongIntegerValidate function.

Input parameters

d: Decimal Type

Output parameters

Long Integer Type

Examples

Usage

Development environment

Aggregate

DecimalToLongInteger( 134.2 )

134

134

DecimalToLongInteger( 134.5 )

134

134

DecimalToLongInteger( 133.5 )

134

133

DecimalToLongInteger( 134.7 )

135

134

DecimalToLongInteger( 134 )

134

134

DecimalToLongInteger( 157898999999988844444.2 )

0

Arithmetic Overflow Error

See Also

DecimalToLongIntegerValidate Function | Available Conversion Functions to Long Integer | Available Built-in Functions