The mi_money_to_binary() function

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

Syntax

mi_money *mi_money_to_binary(money_string)
   mi_lvarchar *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_money_to_binary() 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.

For GLS, the mi_money_to_binary() function accepts the monetary string in the monetary format of the current processing locale. It also performs any code-set conversion necessary between the current processing locale and the target locale.

Important: The mi_money_to_binary() function is supported only for compatibility with earlier versions of existing DataBlade® API modules. The DataBlade API will eventually discontinue support for this function. Use the mi_string_to_money() function in any new DataBlade API modules.

Return values

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