DATE DOW()
From Recital Documentation Wiki
Revision as of 11:01, 30 March 2009 by Yvonnemilne (Talk | contribs)
PURPOSE
Return the day of the week
SYNONYM
api_date_day()
SYNOPSIS
#include "dbapi.h" int DATE_DOW(date) <input parameters> unsigned long date; /* Recital date */ <output parameters> none
DESCRIPTION
The DATE_DOW() function will return the number representing the day of the week from the specified date as an integer. Starting with Sunday as day 1, and ending with Saturday as day 7.
EXAMPLE
The following example converts today's date to an integer value representing the day of the month.
#include "dbapi.h" dbapi_date_dow() { int day; unsigned long date; if (_parinfo(1) != API_DTYPE) { _retc(""); } date = DATE_STOD(_pards(1) ); day = DATE_DOW( date ); if ( day == 1) { _retc( "Today is Sunday"); } }
SEE ALSO
_parinfa(), _parinfo(), _pards(), _retds(), ISDATE(), DATE_AMPM(), DATE_CDOW(), DATE_CMONTH(), DATE_CTOD(), DATE_DATE(), DATE_DAY(), DATE_DTOC(), DATE_DTOS(), DATE_MONTH(), DATE_STOD(), DATE_TIME(), DATE_YEAR()