Sorry i mean Time3 - Time4. Anyway, TIme4- Time3 will generate the same result.
I'll give my sample source code as following:
 
procedure TForm1.Button1Click(Sender: TObject);
var Time1, Time2 : TTime;
begin
  Time1 := strToTime('14:00');
  Time2 := strToTime('14:30');
  ShowMessage(TImeToStr(Time2 - TIme1));
  ShowMessage(TImeToStr(Time1 - Time2));
end;

Both of the MessageBox give me the message : 12:30:00 AM .. All i want is 
00:30, means 30 minutes differences


Vahan Yoghoudjian <[EMAIL PROTECTED]> wrote:
    Do you mean (Time4-Time3) or (Time3-Time4)?

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] Behalf
Of soonhuat ong
Sent: Wednesday, June 29, 2005 7:52 AM
To: [email protected]
Subject: [delphi-en] differences between 2 time value



How do i calculate the differences between 2 time ?
Let's say:
Time1 = 13:00
Time2 = 12:00

The difference is 1:00 hour

I try (Time1 - Time2), and it works fine..
But when the total difference less than 1 hour, it give me difference
result:
For eg:
Time3 = 14:30
TIme4 = 14:00

(Time4 - Time3) will give me 12:30 .. what i want is 00:30. ANy idea ??



---------------------------------
Discover Yahoo!
Have fun online with music videos, cool games, IM & more. Check it out!

[Non-text portions of this message have been removed]



-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED]



----------------------------------------------------------------------------
----
YAHOO! GROUPS LINKS

  a..  Visit your group "delphi-en" on the web.

  b..  To unsubscribe from this group, send an email to:
   [EMAIL PROTECTED]

  c..  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


----------------------------------------------------------------------------
----




[Non-text portions of this message have been removed]



-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED] 



SPONSORED LINKS 
C programming language Computer programming languages The c programming 
language C programming language List of programming languages Delphi programmer 

---------------------------------
YAHOO! GROUPS LINKS 


    Visit your group "delphi-en" on the web.
  
    To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED]
  
    Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 


---------------------------------



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

[Non-text portions of this message have been removed]



-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/delphi-en/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to