rstrdate()

Converts a character string to the native database date format.

Syntax

mint rstrdate(char *str, int4 *jdate);
  1. str is a pointer to a char string containing the date to convert.
  2. jdate is a pointer to an int4 integer that receives the converted date value.

Returns

Table 1. Return codes
Code Description
0 The conversion was successful.
<0 The conversion failed.
-1204 The str parameter specifies an invalid year.
-1205 The str parameter specifies an invalid month.
-1206 The str parameter specifies an invalid day.
-1212 Data conversion format must contain a month, day, or year component. DBDATE specifies the data conversion format.
-1218 The date specified by the str argument does not properly represent a date.

Usage

The DBDATE environment variable specifies the data conversion format.