The mi_binary_to_datetime() function
The mi_binary_to_datetime() function creates a text (string) representation of a date, time, or date and time value from the binary DATETIME representation.
Syntax
mi_lvarchar *mi_binary_to_datetime(dt_data)
mi_datetime *dt_data;
- dt_data
- A pointer to the internal DATETIME representation of the date, time, or date and time value.
Valid in client LIBMI application? | Valid in user-defined routine? |
---|---|
Yes | Yes |
Usage
The mi_binary_to_datetime() function converts the internal DATETIME value that dt_data references into a date, time, or date and time string. This function returns a pointer to the buffer that contains the resulting date, time, or date and time string.
For GLS, the mi_binary_to_datetime() function formats the date, time, or date and time string in the date, time, or date and time 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_binary_to_datetime() 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_datetime_to_string() function
in any new DataBlade®
API modules.
Return values
- An mi_lvarchar pointer
- A pointer to the date and time, date, or time string that mi_binary_to_datetime() creates.
- NULL
- The function was not successful.