Skip to main content

A Date Occurring

  • 4 minutes to read

A Date Occurring format rule allows you to highlight date-time values that fall into a specified interval. This format rule can be applied to dimensions with the continuous date-time group interval.

Supported Intervals

The following intervals are supported when you create a Date Occurring format condition:

  • Next week - Dates that belong to the following week.
  • Tomorrow - Tomorrow.
  • Today - Today.
  • Yesterday - Yesterday.
  • Last week - Dates of the previous week.
  • This Week - Dates that belong to the current week.
  • This Month - Dates that belong to the current month.
  • Next Month - Dates that belong to the following month.
  • Last Month - Dates that belong to the previous month.

The following conditions are hidden from the Date Occurring dialog by default:

  • Following this year - Dates that follow the current year.
  • This year, beyond this month - Dates of the current year starting from the following month.
  • This month, beyond next week - Dates of the current month that follow the next week.
  • This week, beyond tomorrow - Dates of the current week starting from the day after tomorrow.
  • This week, prior to yesterday - Dates of the current week that are prior to yesterday.
  • This month, prior to previous week - Dates of the current month that are prior to the previous week.
  • This year, prior to this month - Dates of the current year that are prior to the current month.
  • Prior to this year - Dates that are prior to the current year.
  • Following the month in 2 months time - Dates that belong to the month in three-months time and beyond.
  • During the month in 2 months time - Dates that belong to the month in two-months time.
  • During the month 2 months ago - Dates that belong to the month two months ago.
  • During the month 3 months ago - Dates that belong to the month three months ago.
  • During the month 4 months ago - Dates that belong to the month four months ago.
  • During the month 5 months ago - Dates that belong to the month five months ago.
  • During the month 6 months ago - Dates that belong to the month six months ago.
  • Prior to the month 6 months ago - Dates that belong to the month seven months ago and earlier.

Set the DashboardSettings.ShowExtendedDateOccurringList property to true or use the DashboardSettings.DefaultSettingsCompatibilityMode property to display them in the dialog.

Create a Format Rule in the WinForms Designer

Click the dimension’s menu button and select Add Format Rule | A Date Occurring.

DateOccurringCondition_Menu

This action invokes the A Date Occurring dialog that allows you to select a date-time interval(s) whose value should be formatted.

DateOccurringFormatCondition

Create a Format Rule in the Web Dashboard

In the Conditional Formatting section, click the plus button to add a new format rule:

Select the data item you want to format and set the condition type to A Date Occurring:

web-format-rules-date-occurring

This action opens the A Date Occurring settings where you can select a format rule’s style and intervals according which the values should be formatting.

web-format-rules-date-occurring-settings

Create a Format Rule in Code

To create the Date Occurring format condition in code, create the FormatConditionDateOccurring class instance and specify the following settings:

Assign the resulting FormatConditionDateOccurring object to the DashboardItemFormatRule.Condition property.

The following example shows how to apply conditional formatting to Grid cells:

View Example: How to Apply Conditional Formatting to Grid Cells