GetCurrentTime Function

Action

Returns the (local) time of the current day in seconds.

Include file

Kernel.bdh

Syntax

GetCurrentTime(): number;

Return value

Returns the (local) time of the current day in seconds.

Example

dcltrans
  transaction TGetCurrentTime
var
  nDate, nTime : number;
  sDateTime : string;
begin
  nDate := GetCurrentDate();
  nTime := GetCurrentTime();
  FormatDateTime(nDate, nTime, "%x %X", sDateTime);

  write("date = "); write(nDate); writeln;
  write("time = "); write(nTime); writeln;
  write("datetime = "); write(sDateTime); writeln;
end TGetCurrentTime;

Output

date = 19980831
time = 37741
datetime = 08/31/98 10:29:01

Sample scripts

MutexLogin.bdf