DATE TTOS()

From Lianjapedia
Jump to: navigation, search

PURPOSE

Return datetime as a string

SYNONYM

api_date_ttos()

SYNOPSIS

#include "lianja_api.h"
 
char	*DATE_TTOS(date)
 
<input parameters>
DATETIME	datetime;		/* 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 "lianja_api.h"
 
lianjaapi_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()