Difference between revisions of "DATE DTOC()"

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"
  
 
char *DATE_DTOC(date)
 
char *DATE_DTOC(date)
Line 25: Line 25:
  
 
<code lang="c">
 
<code lang="c">
#include "lianjaapi.h"
+
#include "lianja_api.h"
  
 
lianjaapi_date_dtoc()
 
lianjaapi_date_dtoc()

Latest revision as of 06:48, 11 April 2013

PURPOSE

Return a date as a character string

SYNONYM

api_date_dtoc()

SYNOPSIS

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

DESCRIPTION

The DATE_DTOC() function will return the specified date as a character string in the format specified by the commands SET DATE and SET CENTURY.

EXAMPLE

The following example converts today's date to character pointer.

#include "lianja_api.h"
 
lianjaapi_date_dtoc()
{
    char		*day;
    unsigned long	date;
 
    if (_parinfo(1) != API_DTYPE) {
       _retc(""):
    }
 
    date = DATE_STOD(_pards(1) );
    day = DATE_DTOC( date );
 
    _retc( day );
}

SEE ALSO

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