Difference between revisions of "DATE YEAR()"
From Lianjapedia
Yvonne.milne (Talk | contribs) (→EXAMPLE) |
Yvonne.milne (Talk | contribs) m (Text replace - "lianjaapi.h" to "lianja_api.h") |
||
(One intermediate revision by the same user not shown) | |||
Line 7: | Line 7: | ||
==SYNOPSIS== | ==SYNOPSIS== | ||
<code lang="c"> | <code lang="c"> | ||
− | #include " | + | #include "lianja_api.h" |
int DATE_YEAR(date) | int DATE_YEAR(date) | ||
Line 25: | Line 25: | ||
<code lang="c"> | <code lang="c"> | ||
− | #include " | + | #include "lianja_api.h" |
lianjaapi_date_year() | lianjaapi_date_year() |
Latest revision as of 06:51, 11 April 2013
PURPOSE
Return the year from a date
SYNONYM
api_date_year()
SYNOPSIS
#include "lianja_api.h" int DATE_YEAR(date) <input parameters> unsigned long date; /* date */ <output parameters> none
DESCRIPTION
The DATE_YEAR() function will return will return the numeric year value from the specified date as an integer.
EXAMPLE
The following example converts today's date to an integer value representing the year.
#include "lianja_api.h" lianjaapi_date_year() { int year; unsigned long date; if (_parinfo(1) != API_DTYPE) {; _retc(""); } date = DATE_STOD(_pards(1)); year = DATE_YEAR( date ); if (year ==1992) { /* commands */ } }
SEE ALSO
_parinfa(), _parinfo(), _pards(), _retds(), ISDATE(), DATE_AMPM(), DATE_CDOW(), DATE_CMONTH(), DATE_CTOD(), DATE_DATE(), DATE_DAY(), DATE_DOW(), DATE_DTOC(), DATE_DTOS(), DATE_MONTH(), DATE_STOD(), DATE_TIME()