strftime - format date and time
#include
size_t strftime(char *s, size_t max, const char *format,
const struct tm *tm);
The strftime() function formats the broken-down time tm according to the format specifica-
tion format and places the result in the character array s of size max.
The strftime() function returns the number of characters placed in the array s, not
including the terminating NUL character, provided the string, including the terminating
NUL, fits. Otherwise, it returns 0, and the contents of the array is undefined.
Note that the return value 0 does not necessarily indicate an error; for example, in many
locales %p yields an empty string.
For more details check man pages.
This is my dashboard for Linux notes, programs, Embedded Linux from porting to board bring up..and All about my learning on Linux.
Comments