convert_value

Use the convert_value v4 API method to convert data types.

Declaration

 short convert_value(
		an_extfn_value *input,
		an_extfn_value *output
		)

Usage

. The primary use of the convert_value API is the converting between DT_DATE, DT_TIME, and DT_TIMESTAMP, and DT_TIMESTAMP_STRUCT. An input and output an_extfn_value is passed to the function.

Input Parameters

Parameter Description
an_extfn_value.data Input data pointer
an_extfn_value.total_len Length of input data
an_extfn_value.type DT_ datatype of input

Output Parameters

Parameter Description
an_extfn_value.data UDF supplied output data point
an_extfn_value.piece_len Maximum length of output data.
an_extfn_value.total_len Server set length of converted
an_extfn_value.type DT_ datatype of desired output

Returns

1 if successful, 0 otherwise.

Related reference
get_value