VarFormatDateTime3w
Usage
HRESULT VarFormatDateTime
(
LPVARIANT pVarIn,
INT nFormat,
ULONG dwFlags,
BSTR* pbstrOut
)
Overview
Format a variant value as a date and/or time.
Params
pVarIn [In] Variant to format.
nFormat [In] Format type (see notes).
dwFlags [In] Flags for the format (VAR_ flags from "oleauto.h").
pbstrOut [Out] Destination for formatted string.
Returns
Success: S_OK. pbstrOut contains the formatted value.
Failure: E_INVALIDARG, if any parameter is invalid. E_OUTOFMEMORY, if enough memory cannot be allocated. DISP_E_TYPEMISMATCH, if the variant cannot be formatted.
Notes
This function uses LOCALE_USER_DEFAULT when determining the date format characters to use. Possible values for the nFormat parameter are:
Value Meaning
----- -------
0 General date format
1 Long date format
2 Short date format
3 Long time format
4 Short time format
Implementation
Declared in "oleauto.h".
Implemented in "dlls/oleaut32/varformat.c".
Debug channel "variant".
Releases
4 releases since Debian 4.0 (Etch); the text changed 3 times.