IDataFunctions::DateTime

The DateTime method converts a DATE to a string VARIANT, based on the specified locale.

HRESULT DateTime(
DATE dtDate,// in
VARIANT vtLocale,// in
VARIANT *pvarRet
);

Parameters

dtDate
A DATE variable that contains the date/time to convert.
vtLocale
A VARIANT that specifies the locale on which to base the conversion. If this VARIANT is empty (VT_EMPTY) or NULL (VT_NULL), DateTime uses the locale specified by a previous call to put_Locale.
pvarRet
If successful, a pointer to a VARIANT that contains the converted value. DateTime initializes this VARIANT’s vt member to VT_BSTR, and stores the converted value in its pbstrVal member. If unsuccessful, DateTime sets pvarRet to NULL.

Include

<commerce.h>

Return Values

Value Description
S_OK This function always returns S_OK. If the conversion fails, pvarRet evaluates to NULL.

Related Topic

IDataFunctions::Date, IDataFunctions::Time


© 1997-1998 Microsoft Corporation. All rights reserved.