Data type conversion functions

Function

Data type conversion functions convert arguments from one data type to another.

Table 5-6 lists the data type conversion functions and their parameters.

Table 5-6: Date type conversion functions

Data type conversion function

Parameters

BIGINTTOHEX

( integer-expression )

CAST

( expression AS datatype )

CONVERT

( datatype, expression [ , format-style ] )

HEXTOBIGINT

( hexadecimal-string )

HEXTOINT

( hexadecimal-string )

INTTOHEX

( integer-expr )

ISDATE

( string )

ISNUMERIC

( string )

Description

The DATE, DATETIME, DATEFORMAT, and YMD functions that convert expressions to dates, timestamps, or strings based on a date format are listed in “Date and time functions”. The STRING function, which converts expressions to a string, is discussed in the section “String functions”.

The database server carries out many type conversions automatically. For example, if a string is supplied where a numerical expression is required, the string is automatically converted to a number. For more information on automatic data type conversions carried out by Sybase IQ, see “Data type conversions”.