ToLong

Summary

The ToLong function converts numeric values and numeric strings to a Long.

Syntax

ToLong(<numeric or numeric string>)

Return Type

Long

Details

The minimum Long value is -9223372036854775808 and the maximum Long value is 9223372036854775807. ToLong will truncate any decimal values found in the input parameter.

Examples

select ToLong(-9223372036854775808), 
TypeNameOf(ToLong(-9223372036854775808))
from Empty()

tolong_01

select ToLong('42.94987'), 
TypeNameOf(ToLong('42.94987'))
from Empty();

tolong_02

Related Functions

ToDecimal

ToDouble

ToInteger

ToLong