Converts a time and date in EdmiDate format to an EdmiPackedDate format.
The date from January 1, 1990 to December 31, 2053 can be represented in EdmiPackedDate format.
Related functions: edmiStringToDate ,edmiGetPackedDate , edmiUnpackDate , and edmiGetDate .
Header:
#include "sdai.h"
Prototype:
EdmiError edmiPackDate(EdmiDate *date,
EdmiPackedDate *packedDate);
Arguments:
date |
The date and time value to in EdmiDate format that should be packed. |
packedDate |
Address of the variable that will receive the given <date> in EdmiPackedDate format. |
Returns:
A completion code of datatype EdmiError is the returned function value. The completion code has the following values:
Completion code = 0 : Operation successfully performed.
Completion code != 0: Error in operation. Completion code is an EDMinterface error code. Use edmiGetErrorText to get the error text corresponding to the error code.
EXAMPLE
EdmiError rstat;
EdmiDate date;
EdmiPackedDate packedDate;
. . .
if (rstat = edmiPackDate (&date, &packedDate)) {
/* Error in operation */
printf("\nError: %s in edmiPackDate \n",
edmiGetErrorText(rstat));
goto error;
}
. . .