## TO_LONG

The `TO_LONG` function converts an input value to a long value. If the input parameter is of a date type, its value will be interpreted as milliseconds since the Unix epoch, converted to long. Boolean true will be converted to long 1, false to 0.

### Examples

Here are a couple of examples of how you can use the `TO_LONG` function in ES|QL queries:

```esql
ROW str1 = "2147483648"
| EVAL long1 = TO_LONG(str1)
```

In this example, the string "2147483648" is converted to a long value.

```esql
ROW str2 = "2147483648.2", str3 = "foo"
| EVAL long2 = TO_LONG(str2), long3 = TO_LONG(str3)
```

In this example, the string "2147483648.2" is converted to a long value. However, the string "foo" cannot be converted to a long value, resulting in a null value and a warning header added to the response.