[]
Use this class to configure the date range and the date or time units used by IPivotField.group(PivotFieldDateGroupOptions). By default, the group range is determined from the PivotCache and the field is grouped by PivotFieldDateGroupBy.Months.
PivotFieldDateGroupOptions options = new PivotFieldDateGroupOptions();
options.setGroupBy(java.util.Arrays.asList(PivotFieldDateGroupBy.Months, PivotFieldDateGroupBy.Years));
options.setAutoStart(true);
options.setAutoEnd(true);
List<PivotFieldDateGroupBy> groupBy = options.getGroupBy();
booleanbooleangetEnd().booleangetStart().doublegetDays()getGroupBy() includes PivotFieldDateGroupBy.Days.getEnd()getStart()voidsetAddGeneratedFieldsToLayout(boolean value) voidsetAutoEnd(boolean value) getEnd().voidsetAutoStart(boolean value) getStart().voidsetDays(double value) getGroupBy() includes PivotFieldDateGroupBy.Days.voidsetEnd(LocalDateTime value) voidvoidsetStart(LocalDateTime value) The default settings determine the start and end dates from the PivotCache, group by PivotFieldDateGroupBy.Months, and use 1 day per group when day grouping is enabled.
When getAutoStart() is true, this value is ignored and the first date is determined from the PivotCache.
PivotFieldDateGroupOptions options = new PivotFieldDateGroupOptions();
options.setStart(LocalDateTime.of(2024, 1, 1, 0, 0));
LocalDateTime start = options.getStart();
null if no explicit start date is set.When getAutoStart() is true, this value is ignored and the first date is determined from the PivotCache.
PivotFieldDateGroupOptions options = new PivotFieldDateGroupOptions();
options.setStart(LocalDateTime.of(2024, 1, 1, 0, 0));
LocalDateTime start = options.getStart();
value - The first date included in the grouped range. Use null to clear the explicit start date.When getAutoEnd() is true, this value is ignored and the last date is determined from the PivotCache.
PivotFieldDateGroupOptions options = new PivotFieldDateGroupOptions();
options.setEnd(LocalDateTime.of(2024, 12, 31, 0, 0));
LocalDateTime end = options.getEnd();
null if no explicit end date is set.When getAutoEnd() is true, this value is ignored and the last date is determined from the PivotCache.
PivotFieldDateGroupOptions options = new PivotFieldDateGroupOptions();
options.setEnd(LocalDateTime.of(2024, 12, 31, 0, 0));
LocalDateTime end = options.getEnd();
value - The last date included in the grouped range. Use null to clear the explicit end date.getStart().
PivotFieldDateGroupOptions options = new PivotFieldDateGroupOptions();
options.setAutoStart(false);
boolean autoStart = options.getAutoStart();
true if the first date is determined from the PivotCache instead of getStart(); otherwise, false.getStart().
PivotFieldDateGroupOptions options = new PivotFieldDateGroupOptions();
options.setAutoStart(false);
boolean autoStart = options.getAutoStart();
value - true to determine the first date from the PivotCache; false to use the value set by setStart(LocalDateTime). When this is false, a start date is required when grouping is applied.getEnd().
PivotFieldDateGroupOptions options = new PivotFieldDateGroupOptions();
options.setAutoEnd(false);
boolean autoEnd = options.getAutoEnd();
true if the last date is determined from the PivotCache instead of getEnd(); otherwise, false.getEnd().
PivotFieldDateGroupOptions options = new PivotFieldDateGroupOptions();
options.setAutoEnd(false);
boolean autoEnd = options.getAutoEnd();
value - true to determine the last date from the PivotCache; false to use the value set by setEnd(LocalDateTime). When this is false, an end date is required when grouping is applied.The returned list is a copy. Modifying it does not change this object; use setGroupBy(Collection) to update the grouping units. When multiple units are used, grouping is applied in the standard order from seconds through years.
PivotFieldDateGroupOptions options = new PivotFieldDateGroupOptions();
options.setGroupBy(java.util.Arrays.asList(PivotFieldDateGroupBy.Months, PivotFieldDateGroupBy.Years));
List<PivotFieldDateGroupBy> groupBy = options.getGroupBy();
PivotFieldDateGroupOptions options = new PivotFieldDateGroupOptions();
options.setGroupBy(java.util.Arrays.asList(PivotFieldDateGroupBy.Months, PivotFieldDateGroupBy.Years));
List<PivotFieldDateGroupBy> groupBy = options.getGroupBy();
value - The date and time units used to create the grouped PivotField. Use null to clear the grouping units. At least one unit is required when grouping is applied.getGroupBy() includes PivotFieldDateGroupBy.Days.
PivotFieldDateGroupOptions options = new PivotFieldDateGroupOptions();
options.setGroupBy(java.util.Arrays.asList(PivotFieldDateGroupBy.Days));
options.setDays(7);
double days = options.getDays();
1.getGroupBy() includes PivotFieldDateGroupBy.Days. This value is used when PivotFieldDateGroupBy.Days is included in getGroupBy(). It must be a finite whole number greater than 0 when grouping is applied. The effective start date must also be earlier than the effective end date.
PivotFieldDateGroupOptions options = new PivotFieldDateGroupOptions();
options.setGroupBy(java.util.Arrays.asList(PivotFieldDateGroupBy.Days));
options.setDays(7);
double days = options.getDays();
value - The number of days in each generated group.
PivotFieldDateGroupOptions options = new PivotFieldDateGroupOptions();
options.setAddGeneratedFieldsToLayout(false);
boolean addGeneratedFields = options.getAddGeneratedFieldsToLayout();
true if generated group fields are automatically added to the PivotTable layout; otherwise, false. The default value is true.
PivotFieldDateGroupOptions options = new PivotFieldDateGroupOptions();
options.setAddGeneratedFieldsToLayout(false);
boolean addGeneratedFields = options.getAddGeneratedFieldsToLayout();
value - true to add generated group fields to the PivotTable layout automatically; false to keep them hidden.