The DecimalToLongInteger function is a built-in function that converts Decimal d to a Long Integer value.

In a .NET application server, the function rounds the input using the round half to even method. In a J2EE application server 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 or Arithmetic Overflow Error in an Aggregate expression. 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

Result

DecimalToLongInteger( 134.2 )

134

DecimalToLongInteger( 134.5 )

134

DecimalToLongInteger( 133.5 )

134 (in a .NET application server) or 133 (in a J2EE application server or in an Aggregate)

DecimalToLongInteger( 134.7 )

135 (in a .NET application server) or 134 (in a J2EE application server or in an Aggregate)

DecimalToLongInteger( 134 )

134

DecimalToLongInteger( 157898999999988844444.2 )

0 (in a .NET or J2EE application server) or Arithmetic Overflow Error (in an Aggregate)

See Also

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