<literal>ECPG_INFORMIX_NUM_OVERFLOW</literal>
is returned.
</para>
<para>
Note that the ECPG implementation differs from the <productname>Informix</productname>
implementation. <productname>Informix</productname> limits a long integer to the range from
-2,147,483,647 to 2,147,483,647, while the limits in the ECPG
implementation depend on the architecture (<literal>-LONG_MAX ..
LONG_MAX</literal>).
</para>
</listitem>
</varlistentry>
<varlistentry id="ecpg-informix-functions-rdatestr">
<term><function>rdatestr</function></term>
<listitem>
<para>
Converts a date to a C char* string.
<synopsis>
int rdatestr(date d, char *str);
</synopsis>
The function receives two arguments, the first one is the date to
convert (<literal>d</literal>) and the second one is a pointer to the target
string. The output format is always <literal>yyyy-mm-dd</literal>, so you need
to allocate at least 11 bytes (including the zero-byte terminator) for the
string.
</para>
<para>
The function returns 0 on success and a negative value in case of
error.
</para>
<para>
Note that ECPG's implementation differs from the <productname>Informix</productname>
implementation. In <productname>Informix</productname> the format can be influenced by setting
environment variables. In ECPG however, you cannot change the output
format.
</para>
</listitem>
</varlistentry>
<varlistentry id="ecpg-informix-functions-rstrdate">
<term><function>rstrdate</function></term>
<listitem>
<para>
Parse the textual representation of a date.
<synopsis>
int rstrdate(char *str, date *d);
</synopsis>
The function receives the textual representation of the date to convert
(<literal>str</literal>) and a pointer to a variable of type date
(<literal>d</literal>). This function does not allow you to specify a format
mask. It uses the default format mask of <productname>Informix</productname> which is
<literal>mm/dd/yyyy</literal>. Internally, this function is implemented by
means of <function>rdefmtdate</function>. Therefore, <function>rstrdate</function> is
not faster and if you have the choice you should opt for
<function>rdefmtdate</function> which allows you to specify the format mask
explicitly.
</para>
<para>
The function returns the same values as <function>rdefmtdate</function>.
</para>
</listitem>
</varlistentry>
<varlistentry id="ecpg-informix-functions-rtoday">
<term><function>rtoday</function></term>
<listitem>
<para>
Get the current date.
<synopsis>
void rtoday(date *d);
</synopsis>
The function receives a pointer to a date variable (<literal>d</literal>)
that it sets to the current date.
</para>
<para>
Internally this function uses the <xref linkend="pgtypesdatetoday"/>
function.
</para>
</listitem>
</varlistentry>
<varlistentry id="ecpg-informix-functions-rjulmdy">
<term><function>rjulmdy</function></term>
<listitem>
<para>
Extract the values for the day, the month and the year from a variable
of type date.
<synopsis>
int rjulmdy(date d, short mdy[3]);
</synopsis>
The function receives the date <literal>d</literal> and a pointer to an array
of 3 short integer values <literal>mdy</literal>. The variable name indicates
the sequential order: <literal>mdy[0]</literal> will be set to contain the
number of the month, <literal>mdy[1]</literal> will be set to the value of the
day and <literal>mdy[2]</literal> will contain the year.
</para>
<para>
The function always returns 0 at the moment.
</para>