Download IBM Informix GLS User's Guide

Transcript
When you set DBTIME to an era-based format, these functions can convert between
literal DATETIME strings and internal DATETIME values.
Tip: IBM Informix products support DBTIME for compatibility with earlier products.
It is recommended that you use the GL_DATETIME environment variable for new
applications.
If you set DBTIME to an era-based DATETIME format (which is specific to a Chinese
or Japanese locale), make sure to set the CLIENT_LOCALE environment variable to a
locale that supports era-based dates and times.
Extended DATETIME-format strings
IBM Informix ESQL/C DATETIME-format functions support extended-format
strings.
The following table shows the extended-format strings that the Informix ESQL/C
DATETIME-format functions support.
Format
Description
December 27, 1991 printed
%y %m %dc1
Taiwanese Ming Guo date
80 12 27
%Y %m %dc1
Taiwanese Ming Guo date
0080 12 27
%y %m %dj1
Japanese era with abbreviated era symbols H03 12 27
%Y %m %dj1
Japanese era with abbreviated era symbols H0003 12 27
%y %m %dj2
Japanese era with full era symbols
A1A2B1B203 12 27
%Y %m %dj2
Japanese era with full era symbols
A1A2B1B20003 12 27
In addition to the formats in the preceding table, these Informix ESQL/C
DATETIME-format functions support the GLS date and time specifiers. For a list of
these specifiers, see “GL_DATE environment variable” on page 2-7 and
“GL_DATETIME environment variable” on page 2-12.
Precedence for DATETIME display formats
The IBM Informix ESQL/C DATETIME-format functions use a precedence to
determine the display format of values in DATETIME columns.
The precedence is as follows:
1. The display format that DBTIME specifies (if DBTIME is set)
2. The display format that GL_DATETIME specifies (if GL_DATETIME is set)
3. The date and time display formats that the client locale specifies (if
CLIENT_LOCALE is set)
4. The date and time display format from the default locale: %iY-%m-%d
%H:%M:%S
Numeric-format functions
The IBM Informix ESQL/C numeric-format functions are rfmtdec(), rfmtdouble(),
and rfmtlong().
These functions support the following extensions to format numeric values:
v Support for multibyte characters in format strings
v Locale-specific formats for numeric values
v Formatting characters for currency symbols
6-10
IBM Informix GLS User's Guide