DATE STOD()
From Lianjapedia
PURPOSE
Return a character string as a date
SYNONYM
api_date_stod()
SYNOPSIS
#include "lianja_api.h" unsigned long DATE_STOD(string) <input parameters> char string; /* Address of a buffer containing character string */ <output parameters> none
DESCRIPTION
The DATE_STOD() function will return will return the specified string in the format "YYYYMMDD" as an unsigned long, the date 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 an unsigned long.
#include "lianja_api.h" lianjaapi_date_stod() { int month; unsigned long date; if (_parinfo(1) != API_DTYPE) { _retc(""); } date = DATE_STOD(_pards(1) ); day = DATE_DAY( date ); if ( month == 12) { /* commands */ } }
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_AMPM(), DATE_CDOW(), DATE_CMONTH(), DATE_CTOD(), DATE_DATE(), DATE_DAY(), DATE_DOW(), DATE_DTOC(), DATE_DTOS(), DATE_TIME(), DATE_YEAR()