请问各位高手:
   decodedate();此函数是干什么用的?
急速求救????!!!!

解决方案 »

  1.   

    将日期型数据分解为年月日(word型)
      

  2.   

    procedure DecodeDate(Date: TDateTime; var Year, Month, Day: Word);
    Returns Year, Month, and Day values for a TDateTime value.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;
      

  3.   

    var lw_year,lw_mnth,lw_day :word;
    decodedate(date,lw_year,lw_mnth,lw_day);
    将传入的DATE分解成年月日呀.
    得到的年月日是WORD型