_strdate -- Copy Current Date

Format

#include <time.h>
char *_strdate(char *date);

Language Level: Extension
_strdate stores the current date as a string in the buffer pointed to by date in the following format:

   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.

Return Value
_strdate returns a pointer to the buffer containing the date string. There is no error return.

Example
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
   *****************************************************/
}



asctime -- Convert Time to Character String
ctime -- Convert Time to Character String
_ftime -- Store Current Time
gmtime -- Convert Time
localtime -- Convert Time
mktime -- Convert Local Time
time -- Determine Current Time
tzset -- Assign Values to Locale Information
<time.h>