DATE DTOC()
From Recital Documentation Wiki
Revision as of 11:01, 30 March 2009 by Yvonnemilne (Talk | contribs)
PURPOSE
Return a date as a character string
SYNONYM
api_date_dtoc()
SYNOPSIS
#include "dbapi.h" char *DATE_DTOC(date) <input parameters> unsigned long date /* Recital date */ <output parameters> none
DESCRIPTION
The DATE_DTOC() function will return the specified date as a character string in the format specified by the Recital commands SET DATE and SET CENTURY.
EXAMPLE
The following example converts today's date to character pointer.
#include "dbapi.h" dbapi_date_dtoc() { char *day; unsigned long date; if (_parinfo(1) != API_DTYPE) { _retc(""): } date = DATE_STOD(_pards(1) ); day = DATE_DTOC( date ); _retc( day ); }
SEE ALSO
_parinfa(), _parinfo(), _pards(), _retds(), ISDATE(), DATE_AMPM(), DATE_CDOW(), DATE_CMONTH(), DATE_CTOD(), DATE_DATE(), DATE_DAY(), DATE_DOW(), DATE_DTOS(), DATE_MONTH(), DATE_STOD(), DATE_TIME(), DATE_YEAR()