copy the current date into a given buffer
#include <time.h> char *_strdate( char *datestr )
The _strdate() function copies the current date to the buffer pointed to by datestr. The date is formatted as MM/DD/YY, where
The buffer must be at least 9 bytes long.
A pointer to the resulting text string, datestr.
#include <stdio.h>
#include <time.h>
void main()
{
char datebuff[9];
printf( "%s\n", _strdate( datebuff ) );
}
WATCOM
| Safety: | |
|---|---|
| Interrupt handler | No |
| Signal handler | Yes |
| Thread | Yes |
Since the year is expressed as two digits, beware of problems with the year 2000.
asctime(), ctime(), gmtime(), localtime(), mktime(), _strtime(), time(), tzset()