TDateTime is a floating point format where the integer part represents the number of days, while the zecimal part represents the time (as part of 24h).
So, if you want a date that is towing from today, just add 2 to the original. If you have two dates and you want to calculate the distance in days, use DaysBetween , as Andreas suggests.
Example:
var D:TDateTime; begin D := EncodeDate(2013, 2, 1); D := D + 2; // Adds two days. end;
You can also use the IncDay function from DateUtils to do the same; Some say this is more readable:
D := IncDay(D, 2);
source share