TimeApartInMins Function
Returns the decimal number of Minutes apart the two date/times are.

Unit
QESBPCSDateTime

Declaration
Function TimeApartInMins(const DT1, DT2: TDateTime): Extended;

Description
If 0 then they are the same Date/Time, if negative then DT1 occurs after DT2 DT2.

Parameters
DT1 First Date/Time to process.
DT2 Second DateTime to process.

Category
Date/Time Arithmetic Routines

Implementation

function TimeApartInMins (const DT1, DT2: TDateTime): Extended;
begin
     if SameDateTime (DT1, DT2) then
          Result := 0
     else
          Result := (DT2 - DT1) * 24 * 60;
End;


HTML generated by Time2HELP
http://www.time2help.com