IMsCustomTerm.SameDate

Fore Syntax

SameDate: String;

Fore.NET Syntax

SameDate: string;

Description

The SameDate method returns period start date for the IsPeriod dummy variable.

Comments

SameDate does not provide the use outside the IsPeriod dummy variable.

Fore Example

Executing the example requires a modeling container with the CONT_MODEL identifier that contains a determinate equation model with the DUMMIS_DETERM identifier. Add links to the Metabase, Ms system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    MsDescr: IMetabaseObjectDescriptor;
    Model: IMsModel;
    Transf: IMsFormulaTransform;
    Determ: IMsDeterministicTransform;
Begin
    mb := MetabaseClass.Active;
    MsDescr := mb.ItemById("CONT_MODEL");
    Model := mb.ItemByIdNamespace("DUMMIES_DETERM", MsDescr.Key).Edit As IMsModel;
    Transf := Model.Transform;
    Determ := Transf.FormulaItem(0).Method As IMsDeterministicTransform;
    Determ.Expression.AsString := "IsPeriod(""" + "2002A" + """,SameDate)";
    (Model As IMetabaseObject).Save;
End Sub UserProc;

After executing the example the SameDate and IsPeriod dummy variables are used in the model equation. The equation will select values for the 2000 year.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Ms;

Public Shared Sub Main(Params: StartParams);
Var
    mb: IMetabase;
    MsDescr: IMetabaseObjectDescriptor;
    Model: IMsModel;
    Transf: IMsFormulaTransform;
    Determ: IMsDeterministicTransform;
Begin
    mb := Params.Metabase;
    MsDescr := mb.ItemById["CONT_MODEL"];
    Model := mb.ItemByIdNamespace["DUMMIES_DETERM", MsDescr.Key].Edit() As IMsModel;
    Transf := Model.Transform;
    Determ := Transf.FormulaItem[0].Method As IMsDeterministicTransform;
    Determ.Expression.AsString := "IsPeriod(""" + "2002A" + """,SameDate)";
    (Model As IMetabaseObject).Save();
End Sub;

See also:

IMsCustomTerm