rfmtdate()

Converts a date that is in the native database date format to a string having a specified format.

Syntax

mint rfmtdate(int4 jdate, char *fmt, char *result);
  1. jdate is the internal representation of a date to convert.
  2. fmt points to a string containing the formatting mask.
  3. result is a pointer to the buffer that receives the formatted string.

Returns

Table 1. Return codes
Code Description
0 The operation was successful.
-1210 The internal date cannot be converted to month-day-year format.
-1211 The program ran out of memory (memory-allocation error).
-1212 Format string is NULL or invalid.

Usage

The fmt string contains the formatting mask for the string.