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 Main;

Var

mb: IMetabase;

rubInst: IRubricatorInstance;

Rub: IRubricator;

Segs: IRubricatorSegments;

SegCount: IRubricatorSegments;

Begin

mb := MetabaseClass.Active;

Rub := mb.ItemById("OBJ_RUBRICATOR").Bind As IRubricator;

rubInst := (Rub As IMetabaseObjectDescriptor).Open(Null) As IRubricatorInstance;

Segs := rubInst.Segments;

SegCount := Segs.GetFactSegments(DateTime.Parse("01.01.2000"), DateTime.Parse("01.12.2000"));

Debug.WriteLine(SegCount.Count);

End Sub Main;

After executing the example the number of segments, that fall into the time range of 01.01.2000 - 01.12.2000, is displayed in the console window.

See also:

IRubricatorSegmentsSet