哪个函数能将 年月日合成一个日期 急!!!!

解决方案 »

  1.   

    procedure TForm1.Button1Click(Sender: TObject);var
      MyTime: TDateTime;
    begin
      MyTime := EncodeTime(0, 45, 45, 7);
      Label1.Caption := TimeToStr(MyTime);
    end;
      

  2.   

    encodedate(year,month,day:word);
    返回一个日期
      

  3.   

    function EncodeDate(Year, Month, Day: Word): TDateTime;
     返回合并年、月、日得到的日期function TryEncodeDate(Year, Month, Day: Word; out Date: TDateTime): Boolean;
     返回合并年、月、日得到的日期是否成功
    说明 当出现非法组合时将返回False并且Date输出为0