IDataFunctions::ValidateDateTime

The ValidateDateTime method that the specified DATE VARIANT falls within a specified date range, using the default locale.

HRESULT ValidateDateTime(
VARIANT vtDate,// in
VARIANT vtMin,// in
VARIANT vtMax,// in
VARIANT *pfValid
);

Parameters

vtDate
A DATE VARIANT that contains the date/time info on which to perform range-checking.
vtMin
A DATE VARIANT that contains the low end of the date range. If this VARIANT is empty (VT_EMPTY) or NULL (VT_NULL), this parameter is ignored.
vtMax
A DATE VARIANT that specifies the high end of the date range. If this VARIANT is empty (VT_EMPTY) or NULL (VT_NULL), this parameter is ignored.
pfValid
If ValidateDateTime is successful, this out-value points to a VARIANT_BOOL VARIANT, the boolVal member of which indicates whether the vtNumber falls within the range specified by vtMin and vtMax; otherwise, pfValid is set to NULL.

Include

<commerce.h>

Return Value

Value Description
S_OK This method always returns S_OK. If the validation fails, the pfRet value is a BOOL_VARIANT that evaluates to FALSE.

Related Topic

IDataFunctions::DateTime, IDataFunctions::ConvertDateTimeString


© 1997-1998 Microsoft Corporation. All rights reserved.