Skip to main content
A newer version of this page is available. .

Dimension.DateTimeGroupInterval Property

Gets or sets the group interval for date-time values.

Namespace: DevExpress.DashboardCommon

Assembly: DevExpress.Dashboard.v18.2.Core.dll

Declaration

[DefaultValue(DateTimeGroupInterval.Year)]
public DateTimeGroupInterval DateTimeGroupInterval { get; set; }

Property Value

Type Default Description
DateTimeGroupInterval **Year**

A DateTimeGroupInterval enumeration member that specifies how to group date-time values.

Available values:

Show 18 items
Name Description
Year

Values are grouped by the year.

Example: 2010, 2011, 2012

Quarter

Values are grouped by the quarter.

Example: Q1, Q2, Q3, Q4

Month

Values are grouped by the month.

Example: January, February, March, … December

Day

Values are grouped by the day of the month.

Example: 1, 2, 3, … 31

Hour

Values are grouped by the hour.

Example: 0, 1, 2, … 23

Minute

Values are grouped by the minute.

Example: 0, 1, 2, … 59

Second

Values are grouped by the second.

Example: 0, 1, 2, … 59

DayOfYear

Values are grouped by the day of the year.

Example: 1, 2, 3, … 365 (366 in a leap year)

DayOfWeek

Values are grouped by the day of the week.

Example: Sunday, Monday, Tuesday, … Saturday

WeekOfYear

Values are grouped by the week of the year.

Example: 1, 2, 3, … 52

WeekOfMonth

Values are grouped by the week of the month.

Example: 1, 2, 3, 4, 5

MonthYear

Values are grouped by the year and month.

Example: January 2012, February 2012, … December 2012, January 2013, …

QuarterYear

Values are grouped by the year and quarter.

Example: Q3 2012, Q4 2012, Q1 2013, Q2 2013, …

DayMonthYear

Values are grouped by the date part.

Example: 3/4/2012, 3/5/2012, 3/6/2012, …

DateHour

Values are grouped by the date part with the hour value.

Example: 3/4/2012 0:00, 3/4/2012 1:00, 3/4/2012 2:00, …

DateHourMinute

Values are grouped by the date part with the hour and minute values.

Example: 3/4/2012 0:00, 3/4/2012 0:01, 3/4/2012 0:02, …

DateHourMinuteSecond

Values are grouped by the date part with the hour, minute and second values.

Example: 3/4/2012 0:00:00, 3/4/2012 0:00:01, 3/4/2012 0:00:02, …

None

Each value is displayed “as is”.

Remarks

Use the DateTimeGroupInterval property to specify how to group date-time values contained in this Dimension. For instance, they can be grouped by years, months, quarters, days of the week, hours, days of the year, etc.

You can also use the DataItem.DateTimeFormat property to specify how to format these values depending on their group interval.

If the Dimension does not contain date-time data, the DateTimeGroupInterval property is not in effect.

Note

You cannot use Grouping feature in OLAP mode.

Example

The following code snippet shows how to create the date-time and string dimensions with the specified group intervals.

Dimension orderDateDimension = new Dimension("Order Date", DateTimeGroupInterval.MonthYear);
Dimension categoryDimension = new Dimension("CategoryName", TextGroupInterval.Alphabetical);

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the DateTimeGroupInterval property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also