DATE STOT()
From Recital Documentation Wiki
Revision as of 10:58, 30 March 2009 by Yvonnemilne (Talk | contribs)
PURPOSE
Return a character string as a datetime
SYNONYM
api_date_stot()
SYNOPSIS
#include "dbapi.h" DATETIME DATE_STOT(string) <input parameters> char string; /* Address of a buffer containing character string */ <output parameters> none
DESCRIPTION
The DATE_STOT() function will return will return the specified string in the format "YYYYMMDDHHMMSS" as an unsigned long, the Recital date format. This function can be used to convert data values for updating Recital date memory variables.
EXAMPLE
The following example converts today's date specified in the character pointer date to a DATETIME.
#include "dbapi.h" dbapi_date_stot() { DATETIME datetime; if (_parinfo(1) != API_TTYPE) { _retc(""); } datetime = DATE_STOT(_pards(1) ); }
SEE ALSO
_parts(), _retts(), ISDATETIME(), DATE_DATETIME(), DATE_TTOS()