ctime
char *ctime (const time_t *calendarTime);
Purpose
Converts the current time to a human-readable string. ctime returns a pointer to the formatted string created by the function.
![]() |
Note Per the C89 specification, this function and the asctime function return a pointer to the same static array of char. Using these functions in conjunction with each other might result in overwriting the previous value of the timeString parameter. For more information about the C89 specification, refer to an external C89 reference. |
Parameters
Input | ||
Name | Type | Description |
calendarTime | const time_t * | Contains the current calendar time as the number of seconds since January 1, 1900 Coordinated Universal Time (UTC). The function converts this value to a human-readable string. |
Return Value
Name | Type | Description |
timeString | char * |
Contains a pointer to the newly created human-readable string.
The string appears in the following format:
Sun Apr 12 05:28:07 1973\n\0 |
Additional Information
Library: ANSI C Library
Include file: ansi_c.h
LabWindows/CVI compatibility: LabWindows/CVI 3.0 and later