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
Date Gives the current date
Now Gives the current date and time
Time Gives the current time
Yesterday Gives the date yesterday
 Author links

 Buy Website Traffic at
 Buywebsitetrafficexperts.com

 Buy Proxies at
 Buyproxies.io
 
 Download this web site as a Windows program.




 
Example code : Show yesterday, today and tomorrows dates
// Full Unit code.
// -----------------------------------------------------------
// You must store this code in a unit called Unit1 with a form
// called Form1 that has an OnCreate event called FormCreate.
 
unit Unit1;
 
interface
 
uses
  DateUtils,   // Unit containing the Tomorrow command
  SysUtils,
  Forms, Dialogs;
 
type
  TForm1 = class(TForm)
    procedure FormCreate(Sender: TObject);
  end;
 
var
  
Form1: TForm1;
 
implementation
{$R *.dfm} // Include form definitions
 
procedure TForm1.FormCreate(Sender: TObject);

begin
  ShowMessage('Yesterday = '+DateToStr(Yesterday));
  ShowMessage('Today     = '+DateToStr(Date));
  ShowMessage('Tomorrow  = '+DateToStr(Tomorrow));

  ShowMessage('Tommorow''s time = '+TimeToStr(Tomorrow));
end;
 
end.
Hide 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 2002 - 2017. All rights reserved.  |  Home Page