Stamp: Double;
The Stamp property returns date and time of the entry into the repository.
Sub Main;
Var
MB: IMetabase;
MS: IMetabaseSecurity;
AL: IAuditLog;
ALogon: IAuditLogons;
d, d1: DateTime;
Begin
MB := MetabaseClass.Active;
MS := MB.Security;
Al := MS.OpenAuditLog;
ALogon := AL.OpenLogons(False);
While Not ALogon.Eof Do
Debug.Write("Session: " + ALogon.Session.ToString + " | ");
d := (ALogon.Stamp As Variant) As DateTime;
d1 := (ALogon.StampOut As Variant) As DateTime;
Debug.WriteLine(d.ToString + "-" + d1.ToString);
ALogon.Next;
End While;
End Sub Button1OnClick;
After executing the example the information about the sessions with the current repository is displayed in the development environment console. A number of the session and dates of start and finish of the session is also displayed.
See also: