FDATETOA C-3

NAME

fdatetoa - format DATE to ASCII

SYNOPSIS

#include <cbase/dtypes.h>

int fdatetoa (d, format, dest, len)

DATE d;

char *format;

char *dest;

int len;

DESCRIPTION

Fdatetoa converts the DATE value d to its ASCII string representation with format, storing the result in dest: a string of len bytes. The number of bytes used in the formatted result is returned.

The DATE value parameter is the number of days beginning with January 1, 1800. January 1, 1800 has a DATE value of 1. If the date is in the twentieth century, a two digit string is used to replace yy in format. Otherwise, a four digit string replaces yy or yyyy.

SEE ALSO

getfdate(C-3), datetoa(C-3)

C/Base Reference Manual Chapter 13, "Formatting Data Values"

DIAGNOSTICS

If an error occurs, fdatetoa returns a negative number and the contents of dest are undefined. The following symbolic error codes are defined in <cbase/dtypes.h>:

FTOOBIG the formatted result is longer than the destination length,

len

FFORMAT format is empty or contains invalid key letters

FEDIT d is not a valid date value