![]() |
|
ESQL/C supports the SQL DATE data type with the ESQL/C date data type for host variables. The date data type stores internal DATE values. It is implemented as a 4-byte integer whose value is the number of days since December 31, 1899. Dates before December 31, 1899, are negative numbers, while dates after December 31, 1899, are positive numbers. For a complete description of the SQL DATE data type, see the Informix Guide to SQL: Reference.
A date-formatting mask specifies a format to apply to some date value. This mask is a combination of the following formats.
Any other characters in the formatting mask are reproduced literally in the result.
When you use a nondefault locale whose dates contain eras, you can use extended-format strings in a numeric-formatting mask. For more information, see the Informix Guide to GLS Functionality.
When you use rfmtdate() or rdefmtdate() to format DATE values, the function uses the date end-user formats that the GL DATE or DB DATE environment variable specifies. If neither of these environment variables is set, these date-formatting functions use the date end-user formats for the locale. The default locale, U.S. English, uses the format mm/dd/yyyy. For a discussion of GL DATE and DB DATE, see the Informix Guide to GLS Functionality.