IDataFunctions::Time

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

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

Parameters

dtDate
A DATE variable that contains the time to convert. Prior to converting this value, Time converts it to a UDATE, and sets its date members (wYear, wMonth, wDay, and wDayOfWeek) to 1899, 12, 30, and 6, respectively.
vtLocale
A VARIANT that specifies the locale on which to base the conversion. If this VARIANT is empty (VT_EMPTY) or NULL (VT_NULL), Time uses the locale specified by a previous call to put_Locale.
pvarRet
If successful, a pointer to a VARIANT that contains the converted value. Time initializes this VARIANT’s vt member to VT_BSTR, and stores the converted value in its bstrVal member. If unsuccessful, Time sets pvarRet to NULL.

Include

<commerce.h>

Return Values

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

Related Topic

IDataFunctions::ConvertTimeString


© 1997-1998 Microsoft Corporation. All rights reserved.