如何把 3:20:8 转成为秒 Integer

解决方案 »

  1.   

    3;20:8 是个什么呀?
    如果想获得秒
    不如用secondof函数
    Delphi syntax:function SecondOf(const AValue: TDateTime): Word;
      

  2.   

    var
      AValue: TDateTime;
    begin
    AValue:=StrToTime('10:10:00');
    ShowMessage(IntToStr(SecondOf(AValue)));怎么结果是零??
      

  3.   

    secondofday返回这天经历了多少秒
    还有secondofminute,secondofweek,secondofyear具体看你需要那一个了
      

  4.   

    procedure TForm1.bsSkinButton2Click(Sender: TObject);
    var
      AValue: TDateTime;
    begin
      AValue:=StrToTime('10:10:01');
      ShowMessage(floatToStr(AValue*86400));
    end;
      

  5.   

    DecodeTime(Present, Hour, Min, Sec, MSec);
      Label2.Caption := IntToStr(Sec) + 60*(IntToStr(Min)) + 3600*(IntToStr(Hour));