Sybase Technical Library - Product Manuals Home
[Search Forms] [Previous Section with Hits] [Next Section with Hits] [Clear Search] Expand Search

dbdatecmp [Table of Contents] dbdatename

Open Client DB-Library/C Reference Manual

[-] Chapter 2: Routines
[-] dbdatecrack

dbdatecrack

Function

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.

Note: The dateinfo->datetzone field is not set by dbdatecrack.

datetime - A pointer to the DBDATETIME value of interest.

Returns

SUCCEED or FAIL.

Comments

See Also

dbconvert, dbdata, dbdatechar, dbdatename, dbdatepart


dbdatecmp [Table of Contents] dbdatename