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


TypeNameComment
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.
The datatype EdmiDate is a structure comprising nine longs holding the following values;
second : [0-59] 
minute : [0-59]  
hour : [0-23] 
day : [1-31] 
month : [1-12] 
year : [1990-2053]  
weekday: [0:Sunday, 1:Monday, … 6:Saturday] 
dayOfYear ; [1-366] Not yet implemented. 
DaylightSavingTime: Not yet implemented. 
 

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.
NOTE: Do not use edmFree to release this memory.

SdaiInteger

stringFormat

Dummy. Not yet used.

Return Value


Error rendering macro 'excerpt-include' : User 'null' does not have permission to view the page 'US:_r_EDMInterface'.

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.

Â