dbdatecrack

Description

Convert a machine-readable DBDATETIME value into user-accessible format.

Syntax

RETCODE dbdatecrack(dbproc, dateinfo, datetime)
 
DBPROCESS    *dbproc;
DBDATEREC    *dateinfo;
DBDATETIME    *datetime;

Parameters

dbproc

A pointer to the DBPROCESS structure that provides the connection for a particular front-end/server process. It contains all the information that DB-Library uses to manage communications and data between the front end and server.

dateinfo

A pointer to a DBDATEREC structure to contain the parts of datetime. DBDATEREC is defined as follows:

 typedef struct dbdaterec 
 { 
     long    dateyear;    /* 1900 to the future */ 
     long    datemonth;   /* 0 - 11 */ 
     long    datedmonth;  /* 1 - 31 */ 
     long    datedyear;   /* 1 - 366 */ 
     long    datedweek;   /* 0 - 6  */ 
     long    datehour;    /* 0 - 23 */ 
     long    dateminute;  /* 0 - 59 */ 
     long    datesecond;  /* 0 - 59 */ 
     long    datemsecond; /* 0 - 997 */ 
     long    datetzone;   /* 0 - 127 */ 
 } DBDATEREC; 

Month and day names depend on the national language of the DBPROCESS. To retrieve these, use dbdatename or dbdayname plus dbmonthname.

NoteThe dateinfo->datetzone field is not set by dbdatecrack.

datetime

A pointer to the DBDATETIME value of interest.

Returns

SUCCEED or FAIL.

Usage

See also

dbconvert, dbdata, dbdatechar, dbdatename, dbdatepart