C++ Programming/Code/Standard C Library/Functions/asctime

From Wikibooks, open books for an open world
Jump to navigation Jump to search

asctime[edit | edit source]

#include <ctime>
char *asctime( const struct tm *ptr );

The function asctime() converts the time in the struct 'ptr' to a character string of the following format:

day month date hours:minutes:seconds year

An example:

Mon Jun 26 12:03:53 2000
Related topics
clock - ctime - difftime - gmtime - localtime - mktime - time