IRubricatorTimeSegment.SetPeriod

Syntax

SetPeriod(dBegin: DateTime; dEnd: DateTime);

Parameters

dBegin - start date of data time range.

dEnd - end date of data time range.

Description

The SetPeriod method determines limits of data time 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. The first segment must be a time range.

Sub Main;

Var

mb: IMetabase;

rubInst: IRubricatorInstance;

Rub: IRubricator;

Segs: IRubricatorSegments;

Seg: IRubricatorSegment;

segmTime: IRubricatorTimeSegment;

Begin

mb := MetabaseClass.Active;

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

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

Segs := rubInst.Segments;

Seg := Segs.Item(0).Edit;

segmTime := Seg As IRubricatorTimeSegment;

segmTime.SetPeriod(DateTime.Parse("01.01.2000"), DateTime.Parse("01.12.2000"));

Seg.Save;

End Sub Main;

After executing the example time range limits of the first data segment are changed. Changes are saved.

See also:

IRubricatorTimeSegment