This function is used to cast data to the
UINT32 data type.
UINT32 ( arg )
The value to be cast. The value has to be of a Numeric or Date & Time data type category.
UINT32 representation of the value provided.
- If the value falls outside of the
UINT32range, an overflow error is returned.
- Date & Time values are first converted to their underlying unix representation before being converted.
- Conversions from floating point numbers floor the value.
This returns the
UINT32 representation of the
FLOAT64 33.3. Without data type context, numeric values are interpreted
as their largest datatype. In this example, because 33.3 is a floating point number it's interpreted as a
If we operate on a
DATETIME whose unix representation is negative, the query errors because of the underlying signed value.
SELECT UINT32(DATETIME("1677-09-21 00:00:00"));
The provided value overflows UINT32