Convert a tm structure to a character array.
#include <time.h> char *asctime(const struct tm *t);
t
A pointer to a tm structure describing the time and date to convert.
This function converts a tm structure, pointed to by t, to a character array. The asctime() and ctime() functions use the same calendar time format. This format, expressed as a strftime() format string is " %a %b %e %H:%M: %S %Y".
The function returns a null-terminated character array pointer containing the textual representation of the date and time described by t.
This facility may not be available on some configurations of the EWL.
#include <time.h> #include <stdio.h> int main(void) { time_t systime; struct tm *currtime; systime = time(NULL); currtime = localtime(&systime); puts(asctime(currtime)); return 0; } Output: Tue Nov 30 12:56:05 1993