mint intoasc(invvalue, outbuf) intrvl_t *invvalue; char *outbuf;
The intoasc( ) function converts the digits of the fields in the interval variable to their character equivalents and copies them to the outbuf character string with delimiters (hyphen, space, colon, or period) between them. You must initialize the interval variable in invvalue with the qualifier that you want the character string to have.
The character string does not include the qualifier or the parentheses that SQL statements use to delimit an INTERVAL literal. The outbuf string conforms to ANSI SQL standards. It includes one character for each delimiter (hyphen, space, colon, or period) plus fields with the following sizes.
An interval value with the day(5) to fraction(5) qualifier produces the maximum length of output. The string equivalent contains 16 digits, 4 delimiters, and the null terminator, for a total of 21 bytes:
DDDDD HH:MM:SS.FFFFF
If you do not initialize the qualifier of the interval variable, the intoasc( ) function returns an unpredictable value, but this value does not exceed 21 bytes.