|
<< Click to Display Table of Contents >> DbiDateEncode |
![]() ![]()
|
C syntax
DBIResult DBIFN DbiDateEncode (iMon, iDay, iYear, pdateD);
Delphi syntax
function DbiDateEncode (iMon: Word; iDay: Word; iYear: SmallInt; var dateD: DbiDate): DBIResult stdcall;
Description
DbiDateEncode encodes separate date components into DBIDATE for use by DbiPutField and other functions.
Parameters
iMon Type: UINT16 (Input)
Specifies the month. Valid values range from 1 through 12.
iDay Type: UINT16 (Input)
Specifies the day. Valid values range from 1 through 31.
iYear Type: INT16 (Input)
Specifies the year. Valid values range from -9999 to 9999.
pdateD Type: pDBIDATE (Output)
Pointer to the client buffer that receives the encoded date.
Usage
This function enables the client to construct a logical date value to use with the function DbiPutField.
DbiResult |
Meaning |
DBIERR_NONE |
The date was encoded successfully. |
DBIERR_INVALIDHNDL |
pDate is NULL. |
DBIERR_INVALIDPARAM |
The ranges of month and day parameters are wrong, according to the rules of the Gregorian calendar. iMon is zero or iMon is greater than 12 or iDay is zero or iDay is greater than 31. |
See also
DbiDateDecode, DbiTimeEncode, DbiTimeDecode, DbiTimeStampEncode, DbiTimeStampDecode