Data type conversion
Applies to: CELONIS 4.0 CELONIS 4.2 CELONIS 4.3 CELONIS 4.4 CELONIS 4.5 CELONIS 4.6 CELONIS 4.7
Description
Data type conversion can be explicit by using custom functions, or implicit depending on context.
Explicit conversion
Currently, the following explicit data type conversion functions are available:
converts STRING input to INT output. [ DEPRECATED SINCE 4.7 Use
TO_INT
instead, but see function documentation for semantic differences. ]TO_INT converts STRING input to INT output. (Since: CELONIS 4.7)
TO_STRING converts INT input to STRING output. (Since: CELONIS 4.7)
TO_TIMESTAMP converts STRING input to DATE output.
Implicit conversion
In some functions and operators, there will be an implicit data type conversion which is done internally, without any loss of information in the output. Examples include:
Other functions with type changes
There are a number of other functions which takes one data type as input, and returns another. These are not conversion functions as such, since the semantics of the functions inherently imply a loss of information. Examples include:
DATE projection functions, such as CALENDAR_WEEK, HOURS and YEAR will extract part of the DATE input and return that information as an INT.
Specifically for DATE handling, functions are available, which use a non-DATE type as input or output:
ADD_SECONDS converts INT input to DATE output. Similar conversions are available in the other DateTime Modification functions.
SECONDS_BETWEEN converts DATE input to FLOAT output. Similar conversions are available in the other DateTime Difference functions.