![]() |
|
#1
|
|||
|
|||
|
How to subtract two time
exemple : 9:10 - 18:05 = 9:15 (9 hours and 15 minutes) Help me please, sorry i dont speach Englis very well... Last edited by Mujaidin; 07-03-2009 at 11:22 AM. |
|
#2
|
|||
|
|||
|
Code:
Var
d1, d2 : TDatetime;
Begin
d1 := StrToTime('09:10');
d2 := StrToTime('18:05');
ShowMessage(TimeToStr(d1-d2));
End;
|
|
#3
|
|||
|
|||
|
Quote:
tanks 1.000 x info
|
|
#4
|
|||
|
|||
|
Hey its a very informative forum to solving our math solution with in just few second.
|
|
#5
|
|||
|
|||
|
good post,interesting
|
|
#6
|
|||
|
|||
|
Dear friends,
The TDateTime = 1 part Integer (days) and 1 part Float Point (Hours) So, you can to do CALCULATIONS with a var TDateTime directly. Use HELP from Delphi for more informations, for FUNCTIONS as: Format(), DateTimeToSTR(), etc.... |
![]() |
| Thread Tools | |
| Display Modes | |
|
|