-

Difference between revisions of "Functions HI-TECH C CTIME"

From HI-TECH C for CP/M Fan WIKI(EN)
Jump to: navigation, search
(Created page with "<strong>CTIME</strong> ==SYNOPSIS== #include <time.h> char * ctime(time_t t) DESCRIPTION <strong>Ctime</strong>() converts the time in seconds pointed to by its ar...")
 
 
Line 7: Line 7:
  
  
DESCRIPTION
+
==DESCRIPTION==
 
<strong>Ctime</strong>() converts the time in seconds pointed to by  its
 
<strong>Ctime</strong>() converts the time in seconds pointed to by  its
 
argument  to a string of the same form as described for
 
argument  to a string of the same form as described for

Latest revision as of 09:43, 12 December 2017

CTIME

SYNOPSIS

#include  <time.h>

char *    ctime(time_t t)


DESCRIPTION

Ctime() converts the time in seconds pointed to by its argument to a string of the same form as described for asctime. Thus the following program prints the current time and date:


#include  <time.h>

main()
{
    time_t      t;

    time(&t);
    printf("%s", ctime(&t));
}

SEE ALSO

gmtime, localtime, asctime, time