The mi_string_to_date() function

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

Syntax

mi_date mi_string_to_date(date_string)
   mi_string *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_string_to_date() function converts the date string that date_string references to its 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.
Important: The mi_string_to_date() function replaces the mi_date_to_binary() function for string-to-internal-DATE conversion in DataBlade® API modules.

The mi_string_to_date() function accepts the date string in the date format of the current processing locale. For more information about the environment factors that determine the format of a date string, see the HCL OneDB™ GLS User's Guide.

For more information about how to convert date strings to internal DATE format, see the HCL OneDB DataBlade API Programmer's Guide.

Return values

An mi_date value
The internal DATE representation that mi_string_to_date() has created.
NULL
The function was not successful.