IRubricatorSegmentsSet.GetTimeSegments

Syntax

GetTimeSegments(DateBegin: DateTime; DateEnd: DateTime): IRubricatorSegmentsSet;

Parameters

DateBegin. Date of the time range start.

DateEnd. Date of the time range end.

Description

The GetTimeSegments property returns the number of time data ranges included in the specified range.

Example

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(NullAs 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:

IRubricatorSegmentsSet