ObjectPascal
Date
Function
Gives the current date SysUtils unit
 function Date : TDateTime;
Description
The Date function returns the current date in the local time zone.
 
Because the return value is a TDateTime type, the time component is set to zero (start of day).
Related commands
Now Gives the current date and time
Time Gives the current time
Tomorrow Gives the date tomorrow
Yesterday Gives the date yesterday
 
Example code : Show the current date
begin
  WriteLn('Yesterday = '+DateToStr(Yesterday));
  WriteLn('Today     = '+DateToStr(Date));
  WriteLn('Tomorrow  = '+DateToStr(Tomorrow));

  WriteLn('Today''s time = '+TimeToStr(Date));
end;
Show full unit code
   Yesterday = 28/10/2002
   Today     = 29/10/2002
   Tomorrow  = 30/10/2002
   Today's time = 00:00:00