LPCTSTR GetDate( |
|
BOOL bLocalize |
|
); |
The GetDate method returns a pointer to a string that
contains the message date and time.
Parameters
- bLocalize
- Boolean flag which specifies if the date and time should be
localized for the current timezone.
Return Value
If the method succeeds, the return value is a pointer to the date
and time string. If the method fails, it will return a NULL pointer.
To get extended error information, call GetLastError.
Remarks
If no date has been specified in the message, the Date header
field will be set to the current date and time, and that value will
be returned. The date string returned by this method should never be
directly modified by the application. Each call to this method will
invalidate the previous value that was returned, so if you wish to
save or modify the value, you should first make a private copy of the
string.
To convert this date string to a long integer value that can be
used with the standard C time methods, use the ParseDate
method. Refer to the FormatDate method for information on the
format of the date string.
Requirements
Minimum Desktop Platform: Windows 7 (Service Pack 1)
Minimum Server Platform: Windows Server 2008 R2 (Service Pack 1)
Header File: cstools10.h
Import Library: csmsgv10.lib
Unicode: Implemented as Unicode and ANSI versions.
See Also
FormatDate,
GetHeader,
ParseDate,
SetDate
|