I know you can get the current time using the Now()
function, but how would you get the date of yesterday?
Asked
Active
Viewed 701 times
1

Martijn Pieters
- 1,048,767
- 296
- 4,058
- 3,343
-
https://www.embarcadero.com/resources/white-papers – Delphi Coder Feb 26 '22 at 18:22
-
@DelphiCoder the link no longer works. – dummzeuch Mar 11 '23 at 11:21
-
@dummzeuch still working here! – Delphi Coder Mar 11 '23 at 15:10
-
Apparently a temporary issue. Now it works. – dummzeuch Mar 13 '23 at 08:30
1 Answers
6
Why not just use Date - 1
?
Since one day is 1.0 in TDateTime
encoding, substracting 1
is enough.

Arnaud Bouchez
- 42,305
- 3
- 71
- 159