Create a list of date and time values, which should be used in the filter criteria. Each filter value for a date and time filter is defined by an instance of the DateGrouping class. Thus, to perform filtering, initialize an instance of the DateGrouping class using the DateGrouping (see DateGrouping.DateGrouping) constructor with the following parameters.

A System.DateTime value that specifies the base date or time value to filter by.

A DateTimeGroupingType enumeration member that specifies the part of the System.DateTime value to be used in the filter criteria.

If a column you wish to filter contains the mixed types of data, you can include additional values to the filter criteria. To do this, use the ApplyFilterCriteria method overload with two parameters and pass the FilterValue object, containing required cell values, as the first parameter.