Table of Content
HAL Forum
function Integer GetHour (
Time t)
Description:
Returns hour part of the given Time(hour)
Parameters:
t Time
global
procedure vTimeDiff(Time stta,Time endta,var val res)
BEGIN
  val ominutes, tmp1,tmp2;
  
  res = blankval;
  if ((nonblanktime(stta)) or (nonblanktime(endta))) then begin
    tmp1 = GetHour(endta); 
    if (tmp1<0) then begin tmp1 = 0; end;
    tmp2 =GetHour(stta);
    if (tmp2<0) then begin tmp2 = 0; end;
    res = tmp1 - tmp2;
    tmp1 = GetMinute(endta);
    tmp2 = GetMinute(stta);
    if (tmp1<0) then begin tmp1 = 0; end;
    if (tmp2<0) then begin tmp2 = 0; end;   
    ominutes = tmp1 - tmp2;
    ominutes = ominutes/60;//100
    res = res + ominutes;
    res = Round(res,2);
  end;
  RETURN;
END;
Related topics:
««