The mi_string_to_money() function

The mi_string_to_money() function converts a text (string) representation of a monetary value to its binary (internal) MONEY representation.

Syntax

mi_money *mi_string_to_money(money_string)
   mi_string *money_string;
money_string
A pointer to the monetary string to convert to its internal MONEY format.
Valid in client LIBMI application? Valid in user-defined routine?
Yes Yes

Usage

The mi_string_to_money() function converts the monetary string that money_string references to its internal MONEY value. An internal MONEY value is the format that the database server uses to store a value in a MONEY column of the database. This format represents a fixed-point decimal number.
Important: The mi_string_to_money() function replaces the mi_money_to_binary() function for string-to-internal-MONEY conversion in DataBlade® API modules.

The mi_string_to_money() function accepts the monetary string in the monetary format of the current processing locale. For more information, see the Informix® GLS User's Guide.

For more information about how to convert monetary strings to internal MONEY format, see the Informix® DataBlade® API Programmer's Guide.

Return values

An mi_money pointer
A pointer to the internal MONEY representation that mi_string_to_money() has created.
NULL
The function was not successful.