VarFormatDateTime function
Formats a variant containing named date and time information into a string.
Syntax
HRESULT VarFormatDateTime(
_In_ LPVARIANT pvarIn,
_In_ int iNamedFormat,
_In_ ULONG dwFlags,
_Out_ BSTR *pbstrOut
);
Parameters
- pvarIn [in]
-
The variant containing the value to format.
- iNamedFormat [in]
-
The named date formats are as follows.
Value Meaning - 0
General date
- 1
Long date
- 2
Short date
- 3
Long time
- 4
Short time
- dwFlags [in]
-
VAR_CALENDAR_HIJRI is the only flag that can be set.
- pbstrOut [out]
-
Receives the formatted string that represents the variant.
Return value
This function can return one of these values.
| Return code | Description |
|---|---|
|
Success. |
|
One or more of the arguments is not valid. |
Remarks
This function uses the user's default locale while calling VarTokenizeFormatString and VarFormatFromTokens.
Requirements
|
Header |
|
|---|---|
|
Library |
|
|
DLL |
|
See also