DATE STOT()

From Lianjapedia
Jump to: navigation, search

PURPOSE

Return a character string as a datetime

SYNONYM

api_date_stot()

SYNOPSIS

#include "lianja_api.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 datetime format. This function can be used to convert data values for updating date memory variables.

EXAMPLE

The following example converts today's date specified in the character pointer date to a DATETIME.

#include "lianja_api.h"
 
lianjaapi_date_stot()
{
    DATETIME	datetime;
 
    if (_parinfo(1) != API_TTYPE) {
       _retc("");
    }
 
    datetime = DATE_STOT(_pards(1) );
}

SEE ALSO

_parts(), _retts(), ISDATETIME(), DATE_DATETIME(), DATE_TTOS()