Delphi/Lazarus: Date of tomorrow
Question by Compi | Last update on 2020-10-20 | Created on 2017-02-25
Is it possible to determine the date of tomorrow with Delphi or Lazarus? Up to now, I only made to output the date of today using the function "now". Is there also a function for tomorrow?
Related Topics
PHP: Current Date and Time
Tutorial | 0 Comments
MySQL: Write current Date or Time into Column
Tutorial | 0 Comments
PHP: Determine Week Number
Tutorial | 0 Comments
JavaScript: Get current Date and Time
Tutorial | 1 Comment
Delphi/Lazarus: How to set up a Link to a Website in an Application
Tutorial | 0 Comments
Delphi/Lazarus: Display current Date and Time
Tip | 0 Comments
Delphi: Global Treatment of Errors (Exceptions)
Tutorial | 0 Comments
Important Note
Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.
Participate
Ask your own question or write your own article on askingbox.com. That’s how it’s done.
Basically, there are two possibilities for determining tomorrows date.
First, you can just use the function Tomorrow available from the unit DateUtils. Tomorrow returns the date of tomorrow in the DateTime format (the time component is 0 o'clock), so that you can use this function the same way you can use the Now function:
The second possibility is to just take Now with adding one additional day:
You should know for this that TDateTime is just a simple point number, where the days are saved before the decimal separator at the time behind, so that you can quite simple add or substract days from a given DateTime.
Last update on 2020-10-20 | Created on 2017-02-26