|
<< Click to Display Table of Contents >> C Examples: DbiTimeEncode |
![]() ![]()
|
Encode Hour, Minute, and Seconds into a TIME variable.
This example uses the following input:
fDbiTimeEncode(10, 50, 15, &MyTime);
DBIResult fDbiTimeEncode(UINT16 Hour, UINT16 Minute, UINT16 Seconds, pTIME Time)
{
DBIResult rslt;
UINT16 MSeconds;
MSeconds = (UINT16)(Seconds * 1000);
if (MSeconds > 59999)
return DBIERR_INVALIDTIME;
else
rslt = Chk(DbiTimeEncode(Hour, Minute, MSeconds, Time));
return rslt;
}