Difference between revisions of "DATE DAY()"

From Recital Documentation Wiki
Jump to: navigation, search
 
 
Line 52: Line 52:
  
 
==SEE ALSO==
 
==SEE ALSO==
[[_parinfa()]], [[_parinfo()]], [[_pards()]], [[_retds()]], [[ISDATE()]], [[DATE_AMPM()]], [[DATE_CDOW()]], [[DATE_CMONTH()]], [[DATE_CTOD()]], [[DATE_DAY()]], [[DATE_DOW()]], [[DATE_DTOC()]], [[DATE_DTOS()]], [[DATE_MONTH()]], [[DATE_STOD()]], [[DATE_TIME()]], [[DATE_YEAR()]]
+
[[_parinfa()]], [[_parinfo()]], [[_pards()]], [[_retds()]], [[ISDATE()]], [[DATE_AMPM()]], [[DATE_CDOW()]], [[DATE_CMONTH()]], [[DATE_CTOD()]], [[DATE_DOW()]], [[DATE_DTOC()]], [[DATE_DTOS()]], [[DATE_MONTH()]], [[DATE_STOD()]], [[DATE_TIME()]], [[DATE_YEAR()]]
  
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:SDK]]
 
[[Category:SDK]]

Latest revision as of 11:02, 30 March 2009

PURPOSE

Return the day of the month


SYNONYM

api_date_date()


SYNOPSIS

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


DESCRIPTION

The DATE_DAY() function will return the day of the month from the specified date as an integer.


EXAMPLE

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

#include "dbapi.h"
 
dbapi_date_day()
{	
    int		day;
    unsigned long	date;
 
    if (_parinfo(1) != API_DTYPE) {
       _retc("");
    }
 
    date = DATE_STOD(_pards(1) );
    day = DATE_DAY( date );
 
    if ( day == 1) {
       _retc( "First day of the Month");
    }
 
}


SEE ALSO

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