edmiGetLocalDate
EdmiError edmiGetLocalDate(EdmiPackedDate *packedDate, EdmiDate *date, EdmiStringDate *stringDate, SdaiInteger stringFormat);
Returns the current local time and date in various formats. The current local time and date is provided by the EDMserver to facilitate a synchronous time and date for all EDMserver clients.
Arguments
Type | Name | Comment |
EdmiPackedDate | packedDate | Address of a variable that will receive the current local time and date in an EdmiPackedDate format. Dates from January 1st, 1990 to December 31st, 2053 can be represented in this format. Use edmiUnpackDate to convert the packed date into a readable format. |
EdmiDate | date | Address of a data structure that will receive the current local time and date in EdmiDate format. The actual data is located in a buffer in EDMinterface that can be overwritten in the next EDMinterface call. |
EdmiStringDate | stringDate | Address of a variable that will receive the current local time and date in a readable string format. The actual string is located in a buffer in EDMinterface that may be overwritten by the next EDMinterface call. If you need to preserve this string, use strcpy to create a copy. |
SdaiInteger | stringFormat | Dummy. Not yet used. |
Return Value
Options
Â
Example
Â
EdmiError rstat; EdmiPackedDate packedDate; EdmiStringDate stringDate; EdmiDate date; . . . if (rstat = edmiGetLocalDate(&packedDate, &date, &strDate, 0)) { printf("\nError %d in edmiGetLocalDate: %s", rstat, edmiGetErrorText(rstat)); goto error; } printf("\nTime: %02d:%02d:%02d", date.hour, date.minute, date.second); printf("\nDate: %02d/%02d/%04d", date.day, date.month, date.year); printf("\nString Formatted Date: %s", strDate); printf("\nPacked Date: %lu", packedDate);
Â
See also
Filter by label
There are no items with the selected labels at this time.
Â