Skip to main content

FLOAT64

This function is used to cast data to the FLOAT64 data type.

Syntax

FLOAT64 ( arg )  

arg
The value to be cast. The value has to be of a Numeric or Date & Time data type category.

Return Value

Returns the FLOAT64 representation of the value provided.

Remarks

  • If the value falls outside of the FLOAT64 range, an overflow error is returned.
  • Date & Time values are first converted to their underlying unix representation before being converted.

Examples

This returns the FLOAT64 representation of -1. Without data type context, numeric values are interpreted as their largest datatype. In this example, because -1 is signed it's interpreted as an INT64.

SELECT FLOAT64(-1);

Response:

FLOAT64(-1) [FLOAT64]
-1.0