Pavel
TDateTime is held as a floating point number. The integral part is days from the start day sometime in the remote past, the fractional part is the fraction of a day. So x.0 is midnight; x.5 is noon. To get your answer, (Time1-Time2) * 24 gives the difference in hours and fractions of an hour. This will also work if the answer is > 24 Bobby Clarke -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] Behalf Of Pavel Evarestov Sent: 29 June 2005 15:16 To: [email protected] Subject: [delphi-en] Re: differences between 2 time value Hi! >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 ?? May be the easiest way is to use DateUtils VCL module? Look into Delphi VCL help. Best regards, Pavel Evarestov [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] 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/

