'Declaration Public Function ApplyRelativeDateRangeFilter( _ ByVal relativeColumnIndex As System.Integer, _ ByVal offset As RelativeDateRangeOffset, _ ByVal duration As RelativeDateRangeDuration _ ) As RelativeDateRangeFilter
public RelativeDateRangeFilter ApplyRelativeDateRangeFilter( System.int relativeColumnIndex, RelativeDateRangeOffset offset, RelativeDateRangeDuration duration )
Exception | Description |
---|---|
System.ComponentModel.InvalidEnumArgumentException | offset is not defined in the RelativeDateRangeOffset enumeration. |
System.ComponentModel.InvalidEnumArgumentException | duration is not defined in the RelativeDateRangeDuration enumeration. |
System.InvalidOperationException | If the Region was not set. |
System.ArgumentOutOfRangeException | If the relativeColumnIndex is outside of the Region. |
The RelativeDateRangeFilter allows you to filter in dates which are in the previous, current, or next time period relative to the date when the filter was applied. The time periods available are day, week, month, quarter, year. So when using the previous filter type with a day duration, a 'yesterday' filter is created. Or when using a current filter type with a year duration, a 'this year' filter is created. However, these filters compare the data against the date when the filter was created. So a 'this year' filter created in 1999 will filter in all cells containing dates in 1999, even if the workbook is opened in 2012.
Target Platforms: Windows 8.1, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
View on GitHub