请问用那个函数取得Time中的时分秒?

解决方案 »

  1.   

    DecodeDate, DecodeTime Exampleprocedure 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;
      

  2.   

    Uses DateUtils;procedure DecodeDateTime(const AValue: TDateTime; out AYear, AMonth, ADay, AHour, AMinute, ASecond, AMilliSecond: Word);
      

  3.   

    到DateUtils单元中看一下就知道了
      

  4.   

    uses DateUtils;DayOf(Now);
    MonthOf(now);
    YearOf(now);
    HourOf(now);
    MinuteOf(now);
    SecondOf(now);
      

  5.   

    formatdatatime('ss',time());
    .......
      

  6.   

    getsystemtime!
    具体设置按f1!