IDataFunctions::ConvertDateString

The ConvertDateString method converts a string representation of the date to a DATE VARIANT, based on the specified locale.

Syntax

HRESULT ConvertDateString(
VARIANT vtDate,// in
VARIANT vtLocale,// in
VARIANT *pVarDate// out
);

Parameters

vtDate
A VARIANT that contains the date to be set. This is a VARIANT in which the vt member is of type V_BSTR and in which the BSTR member contains the string expression of the date.
vtLocale
A VARIANT that specifies the locale to be used to perform the conversion. If this VARIANT is empty or NULL, ConvertDateString uses the locale specified by a previous call to put_Locale.
pVarDate
If the conversion is successful, pVarDate points to the VARIANT that contains the converted value; otherwise, NULL. Note that if a time is included in the string expression of the date, ConvertDateString fails, and pvarDate is set to NULL.

Include

<commerce.h>

Return Value

Value Description
S_OK ConvertDateString always returns S_OK. If the conversion is unsuccessful, the pvarDate out-value is NULL.

Related Topic

IDataFunctions::ConvertDateTimeString, IDataFunctions::ConvertTimeString


© 1997-1998 Microsoft Corporation. All rights reserved.