Retts()
From Recital Documentation Wiki
Revision as of 12:27, 30 March 2009 by Yvonnemilne (Talk | contribs)
PURPOSE
Pass a datetime string to Recital
SYNONYM
api_ret_ts()
SYNOPSIS
#include "dbapi.h" int _retts(string) <input parameters> char *string; /* Address of a buffer containing a character string */ <output parameters> none
DESCRIPTION
The _retts() function returns a character string in the format "YYYYMMDDHHMMSS" to Recital as a Recital datetime type. The DATE_TTOS() function can be used to convert a datetime stored in a DATETIME structure to a string format.
EXAMPLE
The following example evaluates the first parameter passed to a string and then returns the result.
Example Recital program:
m_datetime=datetime() m_datetime=datetime_con(m_datetime) return
Example 'C' function:
#include "dbapi.h" dbapi_datetime_con() { char datetime[15]; if ( _parinfo(1) == API_TTYPE ) { strcpy( datetime, _parts(1)); } else { strcpy( datetime, ""); } _retts (datetime ); }
SEE ALSO
_parc(), _parclen(), _parcsiz(), _parinfo(), _retc(), _retclen(), ISDATETIME(), DATE_STOT(), DATE_TTOS()