Getting the Current Date from the System

To get the date from the system, call the get date function, date_get():

int date_get(date_stp, format_stp)
 
UCHAR *date_stp;
/* String to receive formatted date
*/
UCHAR *format_stp;
/* Date format string to use
*/

This function gets the date from the operating system and formats it according to the specified format string.

If you want to use the system date format, you would call:

UCHAR *date_stp;

date_stp = mem_get(9);

date_get(date_stp, SYSDATEFMT);

Note that you must allocate memory for the string used to receive the formatted date. This string must be long enough to accept a date string of the specified format.


Home Contents Previous Next