_strdate

Description

Copies a date to a buffer.

#include <time.h>

char *_strdate( char *datestr );

datestr Current date  

Remarks

The _strdate function copies the date to the buffer pointed to by datestr, formatted

mm/dd/yy

where mm is two digits representing the month, dd is two digits representing the day of the month, and yy is the last two digits of the year. For example, the string

12/05/99

represents December 5, 1999.

The buffer must be at least nine bytes long.

Return Value

The _strdate function returns a pointer to the resulting text string datestr.

Compatibility

Standards:None

16-Bit:DOS, QWIN, WIN, WIN DLL

32-Bit:DOS32X

See Also

asctime, ctime, gmtime, localtime, mktime, time, _tzset

Example

/* 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 );

}

Output

The current date is 06/20/99

The current time is 09:33:13