Locale-specific data formatting

When a C UDR handles strings that contain display formats for date, time, numeric, or monetary data, you must write the UDR so that it handles any locale-specific formats of these display formats.

The DataBlade API provides functions that convert between the internal representation of several data types and its display format.

The following DataBlade API functions convert an internal database value to a string that uses the locale-specific display format.
DataBlade API function Description
mi_date_to_string() Uses the locale-specific display date format to convert an internal DATE value to its string equivalent.
mi_money_to_string() Uses the locale-specific display monetary format to convert an internal MONEY value to its string equivalent.
mi_decimal_to_string() Uses the locale-specific display numeric format to convert an internal DECIMAL value to its string equivalent.
Important: The mi_datetime_to_string() and mi_interval_to_string() functions do not format strings in the date and time formats of the current processing locale. Instead, they create a date, time, or interval string in a fixed ANSI SQL format.
The following DataBlade API functions interpret a string in its locale-specific display format and convert it to its internal database value.
DataBlade API function Description
mi_string_to_date() Converts a string in its locale-specific date display format to its internal DATE format.
mi_string_to_money() Converts a string in its locale-specific currency display format to its internal MONEY format.
mi_string_to_decimal() Converts a string in its locale-specific numeric display format to its internal DECIMAL format.
Important: The mi_string_to_datetime() and mi_string_to_interval() functions do not interpret the date and time formats of the current processing locale. Instead, they interpret the date/time or interval string in a fixed ANSI SQL format.

Copyright© 2018 HCL Technologies Limited