CPowerTime.DateStringmethod
Returns the date as a string based on the specified mask, e.g. "dd-MM-yyyy".
Syntax
FUNCTION DateString (BYREF wszMask AS WSTRING, BYVAL lcid AS LCID = LOCALE_USER_DEFAULT) AS DWSTRING
Parameters
| Name | Description | |
|---|---|---|
wszMask | A picture string that is used to form the date. The format types "d", and "y" must be lowercase and the letter "M" must be uppercase. For example, to get the date string "Wed, Aug 31 94", the application uses the picture string "ddd',' MMM dd yy". | |
lcid | Optional. The language identifier used for the conversion. Default is LOCALE_USER_DEFAULT. |
Return value
The formatted date.
Description
Retuns the date as a string based on the specified mask, e.g. "dd-MM-yyyy".
The following table defines the format types used to represent days.
The following table defines the format types used to represent months.
The following table defines the format types used to represent years.
Reference
- Defined in AfxNova/CPowerTime.inc:931
- Documented in DateTime/CPowerTime Class.md
- Topic: CPowerTime Class