IDataFunctions::ConvertTimeString
The ConvertDateString method converts a string representation of the time to a DATE VARIANT, based on the specified locale. The vt member of this VARIANT must be initialized to VT_BSTR, and its pbstrVal member must contain the BSTR value to convert.
HRESULT ConvertTimeString(
VARIANT vtDate,// in
VARIANT vtLocale,// in
VARIANT *pvarDate// out
);
Parameters
- vtDate
- A VARIANT that contains the string expression of the date. The vt member of this VARIANT must be of type BSTR, and must not contain a date value. If a date value is present, then the pvarDate out-value is set to NULL.
- vtLocale
- A VARIANT that specifies the locale to be used to perform the conversion. If this VARIANT is empty (VT_EMPTY) or NULL (VT_NULL), ConvertTimeString uses the locale specified by a previous call to put_Locale.
- pvarDate
- If successful, a pointer to a VARIANT that contains the converted value; otherwise, NULL.
Include
<commerce.h>
Return Values
Value |
Description |
S_OK |
The conversion was successful. |
DISP_E_TYPEMISMATCH |
The value in vtDate is not a BSTR value. |
Include
<commerce.h>
Related Topic
IDataFunctions::ConvertDateString, IDataFunctions::ConvertDateTimeString, IDataFunctions::Date, IDataFunctions::DateTime
© 1997-2000 Microsoft Corporation. All rights reserved.