Skip to main content

FormatConditionRuleDateOccuring Class

Applies a format if a column’s DateTime value refers to a specific date and/or date interval relative to today. These days and intervals include Today, Yesterday, This week, Earlier this month, Prior to this year, etc.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v24.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

public class FormatConditionRuleDateOccuring :
    FormatConditionRuleAppearanceBase,
    IFormatConditionRuleDateOccuring,
    IFormatConditionRuleBase

Remarks

Use the FormatConditionRuleDateOccuring.DateType property to specify the type of filter that identifies a target date or date interval. Supported dates and date intervals are enumerated by the FilterDateType type. Values of this enumerator can be combined using a bitwise OR operator.

The FormatConditionRuleDateOccuring object applies a format to cells that relate in some way to Today’s date. If a system date was changed during application operation, use the FormatConditionRuleDateOccuring.ResetCurrentDate methods to reapply the conditional formatting rule.

You can use the FormatConditionRuleAppearanceBase.PredefinedName property to apply one of the predefined style formats (Italic Text, Red Bold Text, Green Fill, Yellow Text with Yellow Fill, etc.), or use the FormatConditionRuleAppearanceBase.Appearance property to provide a custom appearance.

The following images demonstrate examples of applying a FormatConditionRuleDateOccuring format.

FormatDateStrikeoutText FormatDateRedTextAndFill

To compare a cell value with a specific date (a DateTime constant), use the FormatConditionRuleValue format.

See the following documents to learn more.

Inheritance

See Also