SetPeriod(dBegin: DateTime; dEnd: DateTime);
dBegin. Start date of time data range.
dEnd. End date of time data range.
The SetPeriod method determines limits of data time range.
Executing the example requires that the repository contains a time series database with the OBJ_RUBRICATOR identifier, in which segments must be determined. The first segment must be a time range.
Sub UserProc;
Var
Mb: IMetabase;
RubInst: IRubricatorInstance;
Segs: IRubricatorSegments;
Seg: IRubricatorSegment;
SegTime: IRubricatorTimeSegment;
Begin
Mb := MetabaseClass.Active;
RubInst := Mb.ItemById("OBJ_RUBRICATOR").Open(Null) As IRubricatorInstance;
Segs := RubInst.Segments;
Seg := Segs.Item(0).Edit;
SegTime := Seg As IRubricatorTimeSegment;
SegTime.SetPeriod(DateTime.Parse("01.01.2000"), DateTime.Parse("01.12.2000"));
Seg.Save;
End Sub UserProc;
After executing the example time range limits of the first data segment are changed. Changes are saved.
See also: