[]
Specifies a relative time period used by date-based conditional formatting rules.
Use this enum with DateOperator on a TimePeriod rule to indicate which relative date range, such as today, last week, or next month, the rule should evaluate.
public enum TimePeriods
Public Enum TimePeriods
IFormatCondition condition = worksheet.Range["A1:A5"]
.FormatConditions.Add(FormatConditionType.TimePeriod, FormatConditionOperator.None, null, null);
condition.Interior.Color = Color.Yellow;
condition.DateOperator = TimePeriods.Today;
| Name | Description |
|---|---|
| Last7Days | Specifies the last 7 days. |
| LastMonth | Specifies last month. |
| LastWeek | Specifies last week. |
| NextMonth | Specifies next month. |
| NextWeek | Specifies next week. |
| ThisMonth | Specifies this month. |
| ThisWeek | Specifies this week. |
| Today | Specifies today. |
| Tomorrow | Specifies tomorrow. |
| Yesterday | Specifies yesterday. |