[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]


ctime

Convert a time_t type to a character array.

Compatibility:

This function is compatible with the following targets:

ANSI

BeOS

EMB/RTOS

Mac OS

Palm OS

Win32


Prototype:
#include <time.h>
char *ctime(const time_t *timer);
Parameters:

Parameters for this facility are:

timer  
const time_t *  
The address of the time_t variable  

Remarks:

The ctime() function converts a time_t type to a character array with the same format as generated by asctime().

Return:

ctime() returns a null terminated character array pointer containing the converted time_t value.

See Also:

"asctime"

"strftime"

Example of ctime() usage.:
#include <time.h>
#include <stdio.h>

int main(void)
{
	time_t systime;

	systime = time(NULL);
	puts(ctime(&systime));

	return 0;
}

Output:
Wed Jul 20 13:32:17 1994


[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]

Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.

Last updated: August 16, 2000