The mi_date_to_string() function

The mi_date_to_string() function creates a text (string) representation of a date value from the binary (internal) DATE representation.

Syntax

mi_string *mi_date_to_string(date_data)
   mi_date date_data;
date_data
The internal DATE format to convert to a date string.
Valid in client LIBMI application? Valid in user-defined routine?
Yes Yes

Usage

The mi_date_to_string() function converts the internal DATE value that date_data contains into a date string. An internal DATE value is the format that the database server uses to store a value in a DATE column of the database.
Important: The mi_date_to_string() function replaces the mi_binary_to_date() function for converting an internal DATE value to a date string in DataBlade® API modules.

For GLS, the mi_date_to_string() function formats the date string in the date format of the current processing locale. For more information, see the HCL OneDB™ GLS User's Guide.

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

Return values

An mi_string pointer
A pointer to the date string equivalent of date_data.
NULL
The function was not successful.