IDataFunctions::Date
The Date method converts a DATE to a BSTR VARIANT, based on the specified locale.
Syntax
HRESULT Date(
DATE dtDate,// in
VARIANT vtLocale,// in
VARIANT *pvarRet// out
);
Parameters
-
dtDate
-
A DATE variable that contains the value to convert. Prior to converting this value, Date sets its time elements to zero (0).
-
vtLocale
-
A VARIANT that specifies the locale on which to base the conversion. If this VARIANT is empty (VT_EMPTY) or NULL (VT_NULL), Date uses the locale specified by a previous call to put_Locale.
-
pvarRet
-
If successful, a pointer to a VARIANT that contains the converted value. Date initializes this VARIANT’s vt member to VT_BSTR, and stores the converted value in its pbstrVal member. If unsuccessful, Date sets pvarRet to NULL.
Include
<commerce.h>
Return Values
Value |
Description |
|
S_OK |
This function always returns S_OK. If the conversion is unsuccessful, pvarRet is NULL. |
Related Topic
IDataFunctions::DateTime, IDataFunctions::Time
© 1997-1998 Microsoft Corporation. All rights reserved.