Copies the time to a buffer.
#include <time.h>
char *_strtime( char *timestr );
timestr | Time string |
The _strtime function copies the current time into the buffer pointed to by timestr. The time is formatted as
hh:mm:ss
where hh is two digits representing the hour in 24-hour notation, mm is two digits representing the minutes past the hour, and ss is two digits representing seconds. For example, the string
18:23:44
represents 23 minutes and 44 seconds past 6:00 PM.
The buffer must be at least nine bytes long.
The _strtime function returns a pointer to the resulting text string timestr.
Standards:None
16-Bit:DOS, QWIN, WIN, WIN DLL
32-Bit:DOS32X
asctime, ctime, gmtime, localtime, mktime, time, _tzset
/* STRTIME.C */
#include <time.h>
#include <stdio.h>
void main( void )
{
char dbuffer [9];
char tbuffer [9];
_strdate( dbuffer );
printf( "The current date is %s \n", dbuffer );
_strtime( tbuffer );
printf( "The current time is %s \n", tbuffer );
}
The current date is 06/20/99
The current time is 09:33:13