informix
Informix DataBlade API Programmer's Manual
DataBlade API Function Descriptions

mi_interval_to_string()

The mi_interval_to_string() function creates an ANSI SQL standards text (string) representation of an interval value from its binary (internal) INTERVAL representation.

Syntax

Usage

The mi_interval_to_string() function converts the internal INTERVAL value that intvl_data references into an interval string. The interval string has the following ANSI SQL standards format:

If the internal INTERVAL value contains only a subset of this range, mi_interval_to_string() creates an interval string with the appropriate portion of the preceding format. For example, suppose intvl_data references the internal format of the interval 6 days, 5 hours, and 45 minutes. The mi_interval_to_string() function returns an mi_string value with the following interval string:

The mi_interval_to_string() function does not format the interval string in the date and time formats of the current processing locale.

Return Values

mi_string * is a pointer to the interval string equivalent to intvl_data.
NULL indicates that the function was not successful.

Related Topics

See the descriptions of the following functions: mi_date_to_string(), mi_decimal_to_string(), mi_datetime_to_string(), mi_money_to_string(), and mi_string_to_interval().

For more information on how to convert internal INTERVAL format to interval strings, see Converting Date or Time Between Text and Binary.


Informix DataBlade API Programmer's Manual, Version 9.2
Copyright © 1999, Informix Software, Inc. All rights reserved