# TO_DOUBLE

Converts an input value to a double. If the input is a date type, its value is interpreted as milliseconds since the Unix epoch and converted to double. Boolean `true` is converted to `1.0`, and `false` to `0.0`.

## Syntax

`TO_DOUBLE(field)`

### Parameters

#### field

The input value to convert. This can be a single- or multi-valued column, or an expression.

## Examples

Converts string and numeric values to double, including handling a non-numeric string which results in a null value and a warning.

```esql
ROW str1 = "5.20128E11", str2 = "foo"
| EVAL dbl = TO_DOUBLE("520128000000"), dbl1 = TO_DOUBLE(str1), dbl2 = TO_DOUBLE(str2)
```

This example converts a string representing a number and a numeric string in scientific notation to double, and attempts to convert a non-numeric string, which results in a `null` value and a warning header in the response.
