Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

_strdate, _wstrdate

Copy a date to a buffer.

char *_strdate(
   char *datestr 
);
wchar_t *_wstrdate(
   wchar_t *datestr 
);

Parameters

datestr
A pointer to a buffer containing the formatted date string.

Return Value

Each of these functions returns a pointer to the resulting character string datestr.

Remarks

The _strdate function copies a 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, 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 9 bytes long.

_wstrdate is a wide-character version of _strdate; the argument and return value of _wstrdate are wide-character strings. These functions behave identically otherwise.

Generic-Text Routine Mappings

TCHAR.H routine _UNICODE & _MBCS not defined _MBCS defined _UNICODE defined
_tstrdate _strdate _strdate _wstrdate

Requirements

Routine Required header Compatibility
_strdate <time.h> Win 98, Win Me, Win NT, Win 2000, Win XP
_wstrdate <time.h> or <wchar.h> Win 98, Win Me, Win NT, Win 2000, Win XP

For additional compatibility information, see Compatibility in the Introduction.

Libraries

All versions of the C run-time libraries.

Example

See the example for time.

See Also

Time Management Routines | asctime | ctime | gmtime | localtime | mktime | time | _tzset | Run-Time Routines and .NET Framework Equivalents

Show:
© 2014 Microsoft. All rights reserved.