Gives the date yesterday DateUtils unit
 function Yesterday : TDateTime;
The Yesterday function returns yesterdays date in the local time zone.
Because the return value is a TDateTime type, the time component is set to zero.
The TDateTime type can be processed by many SysUtil and Dateutils routines.(start of day).
Related commands
Date Gives the current date
Now Gives the current date and time
Time Gives the current time
Tomorrow Gives the date tomorrow
 Author links

 Buy Website Traffic at

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

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

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