--- title: "toLong (Conversion to large integer)" slug: "calc-function-to-long" updated: 2026-05-12T13:56:12Z published: 2026-05-12T13:56:12Z canonical: "docs.lobstersoftware.com/calc-function-to-long" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # toLong (Conversion to large integer) *See also*: [toBigDecimal (Conversion to large decimal integer)](/v1/docs/en/calc-function-to-big-decimal), [toInteger (Conversion to large integer)](/v1/docs/en/calc-function-to-integer), [toNumber (Conversion to native number)](/v1/docs/en/calc-function-to-number), [toString (Convert to a string)](/v1/docs/en/calc-function-to-string) > [!NOTE] > Attempts to convert a given input value into a large integer of the "Long" type. > > > [!TIP] > > Tooltip > > > > Syntax: *$toLong(any)* > > > > | Parameter | Description | > > | --- | --- | > > | `any` | Any value (or object) which should be converted. | > > > > If the input value cannot be converted, nothing (null) is returned. > > > > Example: $toLong(1234) → Returns an object of the "Long" type which has the numeric value "1234". ## Syntax *$toLong(any)* ## Parameter | Name | Description | | --- | --- | | any | Any value (or object) which should be converted. | ## Return value If the input value cannot be converted, nothing (null) is returned. ## Examples | Syntax | Result | | --- | --- | | $toLong(1234) | Returns an object of the "Long" type, which has the numeric value 1234. | | $toLong($input) | Tries to convert the input value of the expression. |