ICalculatedCubeFormula.DateEnd

Syntax

DateEnd: DateTime;

Description

The DateEnd property returns date of formula actual end. It is actual if a dimension controlling the choice of the formula actual period is set for the calculated cube.

Example

Executing the example requires that the repository contains a calculated cube with the Calc_Cube identifier. The cube contains two dimensions that are not fixed, also the dimension, controlling the choice of the formula actual period, is set.

Sub Main;

Var

MB: IMetabase;

CubeInst: ICalculatedCubeInstance;

Coord: ICalculatedCubeInstanceCoord;

Formulas: ICalculatedCubeFormulas;

Formula: ICalculatedCubeFormula;

d, d1: DateTime;

Begin

MB := MetabaseClass.Active;

CubeInst := MB.ItemById("Calc_Cube").Open(Null) As ICalculatedCubeInstance;

Coord := CubeInst.CreateCoord;

Coord.MatrixCoord.Item(0) := 0;

Coord.MatrixCoord.Item(1) := 0;

Formulas := CubeInst.Formula(Coord);

Formula := Formulas.Item(0);

d := Formula.DateBegin;

d1 := Formula.DateEnd;

d := DateTime.AddMonths(d, 6);

d1 := DateTime.AddMonths(d, 6);

Formula.ChangePeriod(d, d1);

Formulas.Save;

CubeInst.SaveFormulas;

End Sub Main;

After executing the example dates of the first formula actual start and end are changed for the obtained cube coordinate. These dates are shifted to half a year forward, dates for other formulas are automatically adjusted.

See also:

ICalculatedCubeFormula