DataBlade API functions for date-time or interval conversion
The DataBlade API provides functions for conversion between text and binary representations of date-time or interval data.
DataBlade API function | Convert from | Convert to |
---|---|---|
mi_datetime_to_string() | DATETIME (mi_datetime) | Date-time string |
mi_interval_to_string() | INTERVAL (mi_interval) | Interval string |
mi_string_to_datetime() | Date-time string | DATETIME (mi_datetime) |
mi_string_to_interval() | Interval string | INTERVAL (mi_interval) |
The mi_datetime_to_string(), mi_interval_to_string(), mi_string_to_datetime(), and mi_string_to_interval() functions convert DATETIME and INTERVAL values to and from the ANSI SQL standards formats for these data types.
Server only: The mi_datetime_to_string(), mi_interval_to_string(), mi_string_to_datetime(),
and mi_string_to_interval() functions are useful
in the input and output support functions of an opaque data type that
contains mi_datetime and mi_interval values, as long
as these values use the ANSI SQL formats. They enable you to convert
DATETIME and INTERVAL values between their external format (text)
and their internal (binary) format when transferred to and from client
applications.