DATE TTOS()

From Recital Documentation Wiki
Revision as of 10:56, 30 March 2009 by Yvonnemilne (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

PURPOSE

Return datetime as a string


SYNONYM

api_date_ttos()


SYNOPSIS

#include "dbapi.h"
 
char	*DATE_TTOS(date)
 
<input parameters>
DATETIME	datetime;		/* Recital datetime		*/
 
<output parameters>
none


DESCRIPTION

The DATE_TTOS() function will return the specified datetime as a character string in the format "YYYYMMDDHHMMSS".


EXAMPLE

The following example converts today's date and time to character pointer.

#include "dbapi.h"
 
dbapi_date_ttos()
{
    char		datetime[23];
 
    if (_parinfo(1) != API_TTYPE) {
       _retc("");
    }
 
    strcpy( DATE_TTOS(_parts(1) );
 
    _retc( datetime );
}


SEE ALSO

_parts(), _retts(), ISDATETIME(), DATE_DATETIME(), DATE_STOT()