Difference between revisions of "DATE MONTH()"

From Lianjapedia
Jump to: navigation, search
m (1 revision)
m (Text replace - "lianjaapi.h" to "lianja_api.h")
 
Line 7: Line 7:
 
==SYNOPSIS==
 
==SYNOPSIS==
 
<code lang="c">
 
<code lang="c">
#include "lianjaapi.h"
+
#include "lianja_api.h"
  
 
int DATE_MONTH(date)
 
int DATE_MONTH(date)
Line 25: Line 25:
  
 
<code lang="c">
 
<code lang="c">
#include "lianjaapi.h"
+
#include "lianja_api.h"
  
 
lianjaapi_date_month()
 
lianjaapi_date_month()

Latest revision as of 06:48, 11 April 2013

PURPOSE

Return the month of the year

SYNONYM

api_date_month()

SYNOPSIS

#include "lianja_api.h"
 
int	DATE_MONTH(date)
 
<input parameters>
unsigned long	date		/* date		*/
 
<output parameters>
none

DESCRIPTION

The DATE_MONTH() function will return the numeric month of the year from the specified date as an integer.

EXAMPLE

The following example converts today's date to an integer value representing the month of the year.

#include "lianja_api.h"
 
lianjaapi_date_month()
{
    int		month;
    unsigned long	date;
 
    if (_parinfo(1) != API_DTYPE) {
       _retc(""):
    }
 
    date = DATE_STOD(_pards(1) );
    day = DATE_MONTH( date );
 
    if ( month ==  12) {
       /* 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_STOD(), DATE_TIME(), DATE_YEAR()