Difference between revisions of "DATE STOD()"
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" |
unsigned long DATE_STOD(string) | unsigned long DATE_STOD(string) | ||
Line 25: | Line 25: | ||
<code lang="c"> | <code lang="c"> | ||
− | #include " | + | #include "lianja_api.h" |
lianjaapi_date_stod() | lianjaapi_date_stod() |
Latest revision as of 06:48, 11 April 2013
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()