StartPeriod(El: Integer): Integer;
El — element index.
The StartPeriod method returns index of the element corresponding to the start of the period containing element passed by the El parameter.
Sub Main;
Var
MB: IMetabase;
Obj: IMetabaseObjectDescriptor;
CalClass: CalendarDimInstanceFactory;
Dim: IDimInstance;
CalInst: ICalendarDimInstance;
i: Integer;
Begin
Mb:=MetabaseClass.Active;
Obj:=Mb.ItemById("CALENDAR_DIM");
Dim:=Obj.Open(Null) As IDimInstance;
CalClass:=New CalendarDimInstanceFactory.Create;
CalInst:=CalClass.CreateCalendarDimInstance(Dim);
i:=CalInst.StartPeriod(100);
End Sub Main;
After executing the example the "i" variable contains index of the element corresponding to the beginning of period containing the 100th element. Dictionary identifier: CALENDAR_DIM.
See also: