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 |
|
Download this web site as a Windows program.
|
|
|
|
Example code : Show the current date | begin
ShowMessage('Yesterday = '+DateToStr(Yesterday));
ShowMessage('Today = '+DateToStr(Date));
ShowMessage('Tomorrow = '+DateToStr(Tomorrow));
ShowMessage('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 |
|
|