IFPCFilterExpressions::AddDateFilter method

Applies to: desktop apps only

The AddDateFilter method creates a new FPCFilterExpression object representing a date filter expression in the collection and returns a reference to it.


HRESULT AddDateFilter(
  [in]  FpcFilterCriteria Criteria,
  [in]  FpcFilterCondition Condition,
  [in]  DATE Value,
  IFPCFilterExpression **ppNewFilterExpression
FPCFilterExpressions.AddDateFilter( _
  ByVal Criteria As FpcFilterCriteria, _
  ByVal Condition As FpcFilterCondition, _
  ByVal Value As Date, _
  ByVal ppNewFilterExpression As IFPCFilterExpression _
) As FPCFilterExpression


  • Criteria [in]
    Value from the FpcFilterCriteria enumerated type that specifies the parameter (criteria) used in the filter expression.

    When the FilterType property of the collection is set to fpcSessionsFilter, the only valid value for this parameter is fpcFilterByActivation.

    When the FilterType property of the collection is set to fpcLogViewerFilter, the only valid value for this parameter is fpcFilterByLogTime.

  • Condition [in]
    Value from the FpcFilterCondition enumerated type that specifies the required relationship between the parameter (criteria) and the value included in the filter expression. The following values are valid:

    • fpcLast24Hours
    • fpcLast7days
    • fpcLast30days
    • fpcLastHour
    • fpcLiveData
    • fpcOnOrAfter
    • fpcOnOrBefore
  • Value [in]
    Date literal that, together with the Criteria and Condition parameters, forms the filter expression. This parameter must always be set to a valid date literal, but it is only used if the Criteria parameter is set to fpcOnOrAfter or fpcOnOrBefore.

  • ppNewFilterExpression
    Address of an interface pointer that on return points to the new IFPCFilterExpression interface created.

Return value


This method can return one of the following:

  • S_OK, indicating that the operation succeeded.
  • An error code, indicating that the operation failed. In this case, the [out] parameter returned is a null object.


This method returns a reference to the FPCFilterExpression object if successful. Otherwise, an error is raised that can be intercepted by using an error handler.


The FilterType property of the collection must be set to fpcSessionsFilter or fpcLogViewerFilter before running this method.


Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008 R2, Windows Server 2008 with SP2 (64-bit only)


Forefront Threat Management Gateway (TMG) 2010





See also




Build date: 7/12/2010