Re: How can I add one time to the other?

Posted by webmaster Guido on June 03, 2000 at 16:54:26:

In Reply to: How can I add one time to the other? posted by [DMC]SnP on May 27, 2000 at 15:25:54:

: I mean: I want to add one time to another, for example to add 2minutes to 1 hour and 3 minutes. How can I do it?

TDateTime values are in fact floating point numbers. The integer part is the day-number, and the decimal fraction is the time.
So, if 1 equals a day, that means that 1/24 is an hour, 1/(24*60) is a minute and 1/(24*60*60) is a second. Example: to add 1 hour and 3 minutes to the time now:
NewDateTime := Now + 1/24 + 3/24*60*60

Related Articles and Replies: