Header File
time.h
Category
Conversion Routines, Time and Date Routines
Prototype
char *_strdate(char *buf);
wchar_t *_wstrdate(wchar_t *buf);
Description
Converts current date to string.
_strdate converts the current date to a string, storing the string in the buffer buf. The buffer must be at least 9 characters long.
The string has the form MM/DD/YY where MM, DD, and YY are all two-digit numbers representing the month, day, and year. The string is terminated by a null character.
Return Value
_strdate returns buf, the address of the date string.
Example
#include <time.h> #include <stdio.h> void main(void) { char datebuf[9]; char timebuf[9]; _strdate(datebuf); _strtime(timebuf); printf("Date: %s Time: %s\n",datebuf,timebuf); }
Portability
|
POSIX |
Win32 |
ANSI C |
ANSI C++ |
strdate |
|
+ |
|
|
_wstrdate |
|
+ |
|
|
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|