GetCurrentDate Function

Action

Returns the (local) current date in a YYYYMMDD format.

Include file

Kernel.bdh

Syntax

GetCurrentDate(): number;

Return value

Returns the (local) current date in a YYYYMMDD format.

Example

dcltrans
  transaction TGetCurrentDate
var
  nDate : number;
  sDateString : string;
begin
  nDate := GetCurrentDate();
  sDateString := FormatDate(nDate, DATE_DEFAULT);

  write("date = "); write(nDate); writeln;
  write("datestring = "); write(sDateString); writeln;
end TGetCurrentDate;

Output

date = 19980831datestring = 08/31/98