DelphiBasics
Tomorrow
Function
Gives the date tomorrow DateUtils unit
 function Tomorrow():TDateTime;
Description
The Tomorrow function returns tomorrows date in the local time zone.
 
Because the return value is a TDateTime type, the time component is set to zero (start of day).
 
The TDateTime type can be processed by many SysUtil and Dateutils routines.
Related commands
DateGives the current date
NowGives the current date and time
TimeGives the current time
YesterdayGives the date yesterday
 Download this web site as a Windows program.




 
Example code : Show yesterday, today and tomorrows dates
begin
  ShowMessage('Yesterday = '+DateToStr(Yesterday));
  ShowMessage('Today     = '+DateToStr(Date));
  ShowMessage('Tomorrow  = '+DateToStr(Tomorrow));

  ShowMessage('Tommorow''s time = '+TimeToStr(Tomorrow));
end;
Show full unit code
  Yesterday = 28/10/2002
  Today = 29/10/2002
  Tomorrow = 30/10/2002
  Tomorrow's time = 00:00:00
 
Delphi Programming © Neil Moffatt . All rights reserved.  |  Home Page