Syntax
#include <time.h> char *_strdate(char *date);Description
mm/dd/yy
The two digits mm represent the month, the digits dd represent the day of the month, and the digits yy represent the year. For example, the string 10/08/91 represents October 8, 1991. The buffer must be at least 9 bytes.
Note: The time and date functions begin at 00:00:00 Coordinated Universal Time, January 1, 1970.
This example prints the current date.
#include <stdio.h>
#include <time.h>
int main(void)
{
char buffer[9];
printf("The current date is %s \n", _strdate(buffer));
return 0;
/****************************************************************************
The output should be similar to:
The current date is 01/02/95
****************************************************************************/
}
Related Information