Conversion

Conversion functions allow you to convert between data types. One important use of these functions is to prepare fields for Analytics commands that require input of a specific data type.

Function descriptions

Function Description

BINTOSTR( )

Returns Unicode character data converted from ZONED or EBCDIC character data. Abbreviation for "Binary to String".

CTOD( )

Converts a character or numeric date value to a date. Can also extract the date from a character or numeric datetime value and return it as a date. Abbreviation for "Character to Date".

CTODT( )

Converts a character or numeric datetime value to a datetime. Abbreviation for "Character to Datetime".

CTOT( )

Converts a character or numeric time value to a time. Can also extract the time from a character or numeric datetime value and return it as a time. Abbreviation for "Character to Time".

DATE( )

Extracts the date from a specified date or datetime and returns it as a character string. Can also return the current operating system date.

DATETIME( )

Converts a datetime to a character string. Can also return the current operating system datetime.

DTOU( )

Converts an Analytics date value to a Unicode string in the specified language and locale format. Abbreviation for "Date to Unicode".

EBCDIC( )

Returns a string that has been converted to EBCDIC character encoding.

HASH( )

Returns a salted cryptographic hash value based on the input value.

LEADINGZEROS( )

Adds leading zeros to a character string or a number.

PACKED( )

Returns numeric data converted to the Packed data type.

STOD( )

Converts a serial date – that is, a date expressed as an integer – to a date value. Abbreviation for "Serial to Date".

STODT( )

Converts a serial datetime – that is, a datetime expressed as an integer, and a fractional portion of 24 hours – to a datetime value. Abbreviation for "Serial to Datetime".

STOT( )

Converts a serial time – that is, a time expressed as a fractional portion of 24 hours, with 24 hours equaling 1 – to a time value. Abbreviation for "Serial to Time".

STRING( )

Converts a numeric value to a character string.

TIME( )

Extracts the time from a specified time or datetime and returns it as a character string. Can also return the current operating system time.

UNSIGNED( )

Returns numeric data converted to the Unsigned data type.

UTOD( )

Converts a Unicode string containing a formatted date to an Analytics date value. Abbreviation for "Unicode to Date".

VALUE( )

Converts a character string to a numeric value.

ZONED( )

Converts numeric data to character data and adds leading zeros to the output.