GetTimeSegments(DateBegin: DateTime; DateEnd: DateTime): IRubricatorSegmentsSet;
DateBegin. Date of the time range start.
DateEnd. Date of the time range end.
The GetTimeSegments property returns the number of time data ranges included in the specified range.
Executing the example requires that the repository contains a time series database with the OBJ_RUBRICATOR identifier, in which segments must be determined.
Sub UserProc;
Var
Mb: IMetabase;
RubInst: IRubricatorInstance;
Segs: IRubricatorSegments;
SegCount: IRubricatorSegmentsSet;
Begin
Mb := MetabaseClass.Active;
RubInst := Mb.ItemById("OBJ_RUBRICATOR").Open(Null) As IRubricatorInstance;
Segs := RubInst.Segments;
SegCount := Segs.GetTimeSegments(DateTime.Parse("01.01.2000"), DateTime.Parse("01.12.2000"));
Debug.WriteLine(SegCount.Count);
End Sub UserProc;
After executing the example the console window displays the number of segments that fall into the time range of [01.01.2000 - 01.12.2000].
See also: