Data Type Casting

Converting from one data type to another is a useful feature in BQL. Expression results and variables can be cast to different data types. Rather than providing a general cast function, BQL provides functions to convert to a specific data type.

By default BQL treats fields as Varchar. All data types implicitly cast to Varchar and for that data type no explicit casting is required.

BQL supports the following casts:

Data Type Cast In Report Expressions In Custom Attribute
and Custom
Measure Formulas
In ETL
DATETIME() Yes No Yes
FLOAT() Yes No Yes
INTEGER() Yes No Yes

When a cast is not supported a NULL is returned.