Precedence rules for end-user formats
The precedence rules that define how to determine an end-user
format for an internal DATE value are listed here:
- If a DBDATE format is specified, this format is used.
- If a GL_DATE format is specified, a locale
must be determined:
- If a CLIENT_LOCALE value is specified, it is used with the GL_DATE format string to display DATE values.
- If a DB_LOCALE value is specified but a CLIENT_LOCALE value is not, the DB_LOCALE value is compared with the database locale (read from the systables table of the user database) to verify that the DB_LOCALE value is valid. If the DB_LOCALE value is valid, it is used with the GL_DATE format string to display DATE values. If the DB_LOCALE value is not valid, the database locale is used with the GL_DATE format string.
- If the CLIENT_LOCALE or DB_LOCALE values are not specified, the database locale is used with the GL_DATE format string to display DATE values.
- If a CLIENT_LOCALE value is specified, the DATE formats conform to the default formats associated with this locale.
- If a DB_LOCALE value is specified but no CLIENT_LOCALE value
is specified, the DB_LOCALE value is compared
with the database locale to verify that the DB_LOCALE value
is valid.
If the DB_LOCALE value is valid, the DB_LOCALE default formats are used. If the DB_LOCALE value is not valid, the default formats for dates associated with the database locale are used.
- If the CLIENT_LOCALE or DB_LOCALE values
are not specified, all DATE values are formatted in U.S. English format,
Y4MD-
.