The mi_date_to_binary() function

The mi_date_to_binary() function converts a text (string) representation of a date value to its binary (internal) DATE representation.

Syntax

mi_date mi_date_to_binary(date_string)
   mi_lvarchar *date_string;
date_string
A pointer to the date string to convert to its internal DATE format.
Valid in client LIBMI application? Valid in user-defined routine?
Yes Yes

Usage

The mi_date_to_binary() function converts the date string that date_string references to the internal DATE value. An internal DATE value is the format that the database server uses to store a date in a column of the database.

For GLS, the mi_date_to_binary() function accepts the date string in the date format of the current processing locale. The function also performs any code-set conversion necessary between the current processing locale and the target locale.
Important: The mi_date_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_date() function in any new DataBlade® API modules.

Return values

An mi_date value
The internal (binary) DATE representation of date_string.
NULL
The function was not successful.