programming.nbk: Home | Index | Next Page: char* ctime(const time_t* timer); | Previous Page: C++ virtual functions


 char* asctime(const struct tm* timeptr);

Convert tm structure to string

Interprets the contents of the tm structure pointed by timeptr as a calendar time and converts it to a C string containing a human-readable version of the corresponding date and time.

The returned string has the following format:

Where Www is the weekday, Mmm the month in letters, dd the day of the month, hh:mm:ss the time, and yyyy the year.

The string is followed by a new-line character ('\n') and the terminating null-character.

Parameters

Return Value

A C string containing the date and time information in a human-readable format. The array which holds this string is statically allocated and shared by both the ctime and asctime functions. Each time either one of these functions is called the content of this array is overwritten.


programming.nbk: Home | Index | Next Page: char* ctime(const time_t* timer); | Previous Page: C++ virtual functions


Notebook exported on Monday, 7 July 2008, 18:56:06 PM Eastern Daylight Time