以小时为单位如5.3小时.这样的..请大家帮帮忙...

解决方案 »

  1.   

    自己写个函数转化一下(minute*60+second)/3600+小时呵呵
      

  2.   

    //你的要求看不明白,其实TDateTime就是一个一天为单位的浮点数,一天有24个小时,自己想一下不就明白了Function A(d:TDateTime):Integer;
    begin
      Result:=d*24;
      Result:=(a-trunc(a))*24;//如果你只象要小时部分
      Result:=Trunc(a-trunc(a))*24);//如果你只想要当前时间的小时数
    end;
      

  3.   

    如果你想要时间的小时数
    Function A(d:TDateTime):Integer;
    begin
      Result:=StrToInt(Formatdatetime('hh',d));
    end;