ICubeMetaLoaderBinding.ConvertShortYear

Syntax

ConvertShortYear: Boolean;

Description

The ConvertShortYear property determines whether the short date format is converted.

Comments

Available values:

Example

Executing the example requires a time series database with the OBJ_RUBRICATOR identifier and the time series export file C:\result_exp.txt.

Sub UserProc;
Var
    MB: IMetabase;
    CrInfo: IMetabaseObjectCreateInfo;
    Obj: IMetabaseObject;
    ObjDesc: IMetabaseObjectDescriptor;
    Loader: ICubeMetaLoader;
    Bindings: ICubeMetaLoaderBindings;
    Binding: ICubeMetaLoaderBinding;
    TextProvider: IDtTextProvider;
Begin
    MB := MetabaseClass.Active;
    CrInfo := Mb.CreateCreateInfo;
    CrInfo.ClassId := MetabaseObjectClass.KE_CLASS_CUBEMETALOADER;
    CrInfo.Parent := Mb.ItemById("OBJ_RUBRICATOR").Bind;
    CrInfo.Id := Mb.GenerateId("CUBEMETALOADER", CrInfo.Parent.Key);
    CrInfo.Permanent := False;
    ObjDesc := Mb.CreateObject(CrInfo);
    Obj := ObjDesc.Edit;
    Loader := Obj As ICubeMetaLoader;
   // Data source for importing data from text format
    TextProvider := New DtTextProvider.Create;
    TextProvider.File := "C:\result_exp.txt";
    TextProvider.FormatType := DtTextFormatType.Delimited;
    TextProvider.DelimitedColumnDelimiter := ";";
    TextProvider.DelimitedTextQualifier := """";
    TextProvider.Encoding := "WIN";
    TextProvider.RangeHasHeader := True;
    TextProvider.Open;
    Loader.Data := (TextProvider As IDatasetDataProvider);
    Loader.ImportObjectKey := Obj.Key;
    Loader.NewRevisionName := Meta import;
    Loader.LoadType := CubeMetaLoaderLoadType.CreateAndUpdate;
    Loader.Rubricator := Mb.ItemById("OBJ_RUBRICATOR").Bind As IRubricator;
    Bindings := Loader.Bindings;
    Binding := Bindings.Add;
    Binding.BindingType := CubeMetaLoaderBindingType.Calendar;
    Binding.CalendarOptions.Levels := DimCalendarLevelSet.Year;
    Binding.ByColumns := True;
    Binding.ConvertShortYear := False;
    Binding.CalendarDateFormat := "$Year$";
    Binding.FieldType := CubeMetaLoaderFieldType.Name;
    Binding.Field := "2";
    Binding.EndField := "10";
End Sub UserProc;

After executing the example an object of time series import from the text file C:\result_exp.txt is created. The import binding of the calendar dimension is set to this object. Short format of dates is not converted.

See also:

ICubeMetaLoaderBinding