|
The format in which data appears within an application when it is in literal strings or character variables is called the end-user format. End-user formats are locale specific: different countries use different formats for numeric, monetary, date, and date/time data. The GLS locale file defines locale-specific formats for each of these types of data, as the following table shows.
| Type of Data | Locale-File Category | SQL Built-In Data Types |
|---|---|---|
| Numeric | LC_NUMERIC | DECIMAL, INT8, INTEGER, SMALLINT, FLOAT, SMALLFLOAT |
| Monetary | LC_MONETARY | MONEY |
| Date and Time | LC_TIME | DATE, DATETIME |
Tip: For more information on the end-user formats that this chapter describes, see the "Informix Guide to GLS Functionality."
LC_NUMERIC Locale-File Category
The LC_NUMERIC locale-file category is the section within a GLS locale file that defines the locale-specific formats for strings that contain numeric data. Numeric data is considered to be all values that contain digits except monetary data. Therefore, integer, fixed-point, and floating-point numbers are all considered numeric data. Strings of numeric data are called number strings.
Tip: In the "Informix Guide to GLS Functionality," the LC_NUMERIC locale-file category is sometimes referred to as the NUMERIC locale category. This manual uses LC_NUMERIC as the category name for numeric data.
The LC_NUMERIC category of each locale file contains subcategories that define the different numeric formats for that locale. The following table lists the numeric formats and their corresponding LC_NUMERIC subcategory.
The LC_MONETARY locale-file category is the section within a GLS locale file that defines the locale-specific formats for strings that contain monetary data. Monetary data is considered to be values that contain digits and that represent units of some currency. Therefore, only fixed-point numbers can be monetary data. All other types of numbers (such as integer and floating-point) are considered to be numeric data. Strings of monetary data are called money strings.
Tip: In the "Informix Guide to GLS Functionality," the LC_MONETARY locale-file category is sometimes referred to as the MONETARY locale category. This manual uses LC_MONETARY as the category name for monetary data.
The LC_MONETARY category of each locale file contains subcategories that define the different monetary formats for that locale. The following table lists the monetary formats and their corresponding LC_MONETARY subcategory.
Tip: The DBMONEY environment variable can also specify formats for locale-specific formats for money strings.
For definitions of any of these monetary formats (such as currency symbol, decimal separator, or thousands separator) and more information on the DBMONEY environment variable, see the Informix Guide to GLS Functionality.
The LC_TIME locale-file category is the section within a GLS locale file that defines the locale-specific formats for strings that contain date and time data. Such strings are called date strings (which contain only date data) or date/time strings (which contain date and time data).
Tip: In the "Informix Guide to GLS Functionality," the LC_TIME locale-file category is sometimes referred to as the TIME locale category. This manual uses LC_TIME as the category name for date and time data.
The LC_TIME category of each locale file contains subcategories that define the different date and time formats. The following table lists the available formats and their corresponding LC_TIME subcategory.
Tip: The GL_DATE, GL_DATETIME, DBDATE, and DBTIME environment variables can also specify formats for locale-specific formats for date and time strings.
For definitions of any of these date or time formats (such as eras) and information on related environment variables, see the Informix Guide to GLS Functionality.