Use the convert_value v4 API method to convert data types.
short convert_value( an_extfn_value *input, an_extfn_value *output )
. 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.
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 |
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 |
1 if successful, 0 otherwise.