IMetabase.GetCurrentStamp

Syntax

GetCurrentStamp: DateTime;

GetCurrentStamp(): System.DateTime;

Description

The GetCurrentStamp method returns the current date and time of DBMS server, which hosts the repository.

Example

To execute the example, add a link to the Metabase system assembly.

Sub UserProc;
Var
    Mb: IMetabase;
    CI: ICultureInfo;
    d: DateTime;
Begin
    Mb := MetabaseClass.Active;
    CI := CultureInfo.Current;
    d := Mb.GetCurrentStamp;
    Debug.WriteLine(CI.FormatDateTime(d));
End Sub UserProc;

Imports Prognoz.Platform.Interop.ForeSystem;
Imports Prognoz.Platform.Interop.Metabase;

Public Shared Sub Main(Params: StartParams);
Var
    Mb: IMetabase;
    CIClass: CultureInfoClass = 
New CultureInfoClassClass();
    CI: CultureInfo;
    d: DateTime;
Begin
    Mb := Params.Metabase;
    CI := CIClass.Current;
    d := Mb.GetCurrentStamp();
    System.Diagnostics.Debug.WriteLine(CI.FormatDateTime(d));
End Sub;

After executing the example, the development environment console displays the current date and time of DBMS server.

See also:

IMetabase