用decodetime()函数呀
procedure TForm1.Button1Click(Sender: TObject);var
  Present: TDateTime;
  Year, Month, Day, Hour, Min, Sec, MSec: Word;
 begin
  Present:= Now;
  DecodeDate(Present, Year, Month, Day);
  Label1.Caption := 'Today is Day ' + IntToStr(Day) + ' of Month '
    + IntToStr(Month) + ' of Year ' + IntToStr(Year);
  DecodeTime(Present, Hour, Min, Sec, MSec);
  Label2.Caption := 'The time is Minute ' + IntToStr(Min) + ' of Hour '
    + IntToStr(Hour);
end;
试试吧

解决方案 »

  1.   

    1. 先用StrtoTime将字符串转成TTime,然后用DecodeTime将其分解就可以得到时、分、秒、毫秒的值(word)
    2. 自己写代码扫描字符串
      

  2.   

    哇噻,say()把我要说的给说完了。狂生气
      

  3.   

    可以使用windows单元中的
    procedure GetSystemTime(var lpSystemTime: TSystemTime); stdcall;方法如下:procedure TForm1.Button1Click(Sender: TObject);
    var systime : _SYSTEMTIME;
    begin  GetSystemTime( systime ) thenend; _SYSTEMTIME是声明在windows单元中的结构,其结构如下      systime.wYear    //年
          systime.wMonth   //月
          systime.wDayOfWeek   //................
          systime.wDay 
          systime.wHour 
          systime.wMinute 
          systime.wSecond 
          systime.wMilliseconds
      

  4.   

     edit1.text:=datetostr(now)+' '+timetostr(now)