Retds()

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

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

PURPOSE

Pass a date string to Recital


SYNONYM

api_ret_ds()


SYNOPSIS

#include "dbapi.h"
 
int	_retds(string)
 
<input parameters>
char	*string;		/*Address of a buffer containing a character string	*/
 
<output parameters>
none


DESCRIPTION

The _retds() function returns a character string in the format of "YYYYMMDD" to Recital as a Recital date type. The DATE_DTOS() function can be used to convert a date stored as an unsigned long 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_date=date()
m_date=date_con(m_date)
return

Example 'C' function:

#include "dbapi.h"
 
dbapi_date_con()
{
    char	date[9];
 
    if ( _parinfo(1) == API_DTYPE ) {
       strcpy( date, _pards(1));
    } else {
       strcpy( date, "");
    }
 
    _retds (date );
}


SEE ALSO

_parc(), _parclen(), _parcsiz(), _parinfo(), _retc(), _retclen(), ISCHAR(), CHAR_ALLTRIM(), CHAR_LOWER(), CHAR_LPAD(), CHAR_LTRIM(), CHAR_RPAD(), CHAR_RTRIM(), CHAR_STR(), CHAR_UPPER(), DATE_DTOS(), DATE_STOD()