convert-type()

Prev Next

Converts the data type of value a into the data type b. Additionally, you can specify a format template in parameter c for a.

If the data type is not supported, the function will terminate with an error.

The return value of the function is the converted value.

This function can be used for type sensitive comparisons of two values in "equals" or "goto" functions.

Parameters

Parameter

Description

a

Value whose data type is to be converted.

b

Name of the new data type. Note: Use the three dots to select a value. Note: The value is case-insensitive.

c

(optional) Format template for a.

Examples

Parameter a

Parameter b

Parameter c

Result

Remark

String: 100

integer

Integer: 100

String: 100,00

double

####0,00

Double: 100.0

String: text

biginteger

BigInteger: 0

String: 13.12.2011 12:34:56

timestamp

dd.MM.yyyy hh:mm:ss

Timestamp: 2011-12-13 12:34:56

String: 2011-12-13

timestamp

Timestamp: 2011-12-13 00:00:00.0

String: 2011-12-13 12:34:56

date

Date: 2011-12-13

String: text

timestamp

Timestamp: 1970-01-01 00:00:00.0

The Empty Flag is not set.

BigInteger: 1319106879766

integer

Integer: 551919894

Integer is not able to represent a number that big, which leads to information loss.

BigInteger: 1319106879766

date

Date: 2011-10-20

The number is interpreted as Unix time.

BigInteger: 1319106879766

timestamp

Date: 2011-10-20 12:34:39.766

The number is interpreted as Unix time.