Yes, you need to decode the date times as the fractional part of a TDateTime
is simply the proportion of the day - for instance, 0 is midnight, 0.5 is
noon, 0.75 is 6pm.
Another options is to investigate TTimeStamp, DateTimeToTimeStamp and
TimeStampToMSecs.
Regards,
  Andrew Cooke.


> -----Original Message-----
> From: Grant Black [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, August 12, 1999 9:19 AM
> To:   Multiple recipients of list delphi
> Subject:      [DUG]:  time between 'nows'
> 
> I thought TDateTimes store the time in milli-seconds so that doing the
> following should work (at least for times in the same day):
>  
> var
>   start_time, end_time : TDateTime;
>   duration : double;
> begin
>   start_time := Now;
>   ...
>   end_time := Now;
>  
>   duration := (end_time - start_time) * 1000; {duration in seconds...}
>   ShowMessage('process took'+Format('%f',[duration])+' seconds');
> end;
>  
> For a process that took 2:21:43 (2 hours, 21 minutes), last night my
> code showed '97.22  seconds'.  Mmmh - I need to decode the date_times?
> 
> Grant Black 
> Software Developer 
> SmartMove (NZ) Ltd 
> Phone:     +64 9 361-0219 extn 719 
> Fax  :     +64 9 361-0211 
> Email:     [EMAIL PROTECTED] 
> 
>  
> --------------------------------------------------------------------------
> -
>     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to