DATE CMONTH()

From Recital Documentation Wiki
Revision as of 11:06, 30 March 2009 by Yvonnemilne (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

PURPOSE

Return character name of the month


SYNONYM

api_date_month()


SYNOPSIS

#include "dbapi.h"
 
char	*DATE_CMONTH(date)	 
 
<input parameters>
unsigned long	date;		/* Recital date		*/
 
<output parameters>
none


DESCRIPTION

The DATE_CMONTH() function will return the name of the month from the specified date as a character pointer. The name is returned as a proper noun.


EXAMPLE

The following example stores the name of the month from today's date to the character pointer "month".

#include "dbapi.h"
 
dbapi_date_month()
{
    char		*month;
    unsigned long	date;
 
    if (_parinfo(1) != API_DTYPE) {
       _retc("");
    }
 
    date = DATE_STOD( _pards(1) );
    month = DATE_CMONTH(date);
 
    if (!strcmp(month, "December") )
    {
       /* commands	* /
    }
 
    _retc(month);
 
}


SEE ALSO

_parinfa(), _parinfo(), _pards(), _retds(), ISDATE(), DATE_AMPM(), DATE_CDOW(), DATE_CTOD(), DATE_DATE(), DATE_DAY(), DATE_DOW(), DATE_DTOC(), DATE_DTOS(), DATE_MONTH(), DATE_STOD(), DATE_TIME(), DATE_YEAR()