Difference between revisions of "Retts()"
From Lianjapedia
Yvonne.milne (Talk | contribs) m (1 revision) |
Yvonne.milne (Talk | contribs) m (Text replace - "lianjaapi.h" to "lianja_api.h") |
||
Line 7: | Line 7: | ||
==SYNOPSIS== | ==SYNOPSIS== | ||
<code lang="c"> | <code lang="c"> | ||
− | #include " | + | #include "lianja_api.h" |
int _retts(string) | int _retts(string) | ||
Line 35: | Line 35: | ||
<code lang="c"> | <code lang="c"> | ||
− | #include " | + | #include "lianja_api.h" |
lianjaapi_datetime_con() | lianjaapi_datetime_con() |
Latest revision as of 09:03, 11 April 2013
PURPOSE
Return a datetime string
SYNONYM
api_ret_ts()
SYNOPSIS
#include "lianja_api.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" as a 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 Lianja script:
m_datetime=datetime() m_datetime=datetime_con(m_datetime) return
Example 'C' function:
#include "lianja_api.h" lianjaapi_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()