Home | Previous Page | Next Page   Function Descriptions >

rdatestr( )

The rdatestr( ) function converts an internal DATE value to a character string.

Syntax

mint rdatestr(jdate, outbuf)
   int4 jdate;
   char *outbuf;
jdate
is the internal representation of the date to format.
outbuf
is a pointer to the buffer to contain the string for the jdate value.

Usage

For the default locale, U.S. English, the rdatestr( ) function determines how to interpret the format of the character string with the following precedence:

  1. The format that the DBDATE environment variable specifies (if DBDATE is set)

    For more information, see the IBM Informix: Guide to SQL Reference.

  2. The format that the GL_DATE environment variable specifies (if GL_DATE is set)

    For more information, see the IBM Informix: GLS User's Guide.

  3. The default date form: mm/dd/yyyy
Global Language Support

When you use a nondefault locale and do not set the DBDATE or GL_DATE environment variable, rdatestr( ) uses the date end-user format that the client locale defines. For more information, see the IBM Informix: GLS User's Guide.

End of Global Language Support

Return Values

0
The conversion was successful.
<0
The conversion failed.
-1210
The internal date could not be converted to the character string format.
1212
Data conversion format must contain a month, day, or year component. DBDATE specifies the data conversion format.
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]