IRubricatorInstance.GetDateInterval

Syntax

GetDateInterval(Var From_:DateTime; Var To_:DateTime): Boolean;

Parameters

From_. Variable returning minimum date.

To_. Variable returning maximum date.

Description

The GetDateInterval method returns maximum and minimum dates, which data is available in the time series database.

Comments

GetDateInterval returns False if the time series database contains no data, or the last revision of each data point is deleted; otherwise the method returns True.

As parameters From_ and To_ are variables only to be specified. Constants must not be specified.

Example

Executing the example requires a time series database with the OBJ_RUBRICATOR identifier. Also, add links to the Cubes and Metabase system assemblies.

    Sub UserProc;
    Var
        mb: IMetabase;
        Rub: IRubricator;
        RubI: IRubricatorInstance;
        dateFrom: DateTime;
        dateTo: DateTime;
    Begin
        mb := MetabaseClass.Active;
        Rub := mb.ItemById("OBJ_RUBRICATOR").Bind As IRubricator;
        RubI := (Rub As IMetabaseObject).Open(NullAs IRubricatorInstance;
        If RubI.GetDateInterval(dateFrom, dateTo) Then
            Debug.WriteLine("From:  + dateFrom.ToShortDateString + " To: " + dateTo.ToShortDateString);
        End If;
    End Sub UserProc;

After executing the example the console window displays minimum and maximum dates, which data is available in the time series database.

See also:

IRubricatorInstance