怎么把integer类型的数据转换成日期类型阿?

解决方案 »

  1.   

    var
      i:integer;  i:=1000;
      showmessage(datetostr(i));//1902-9-26
      

  2.   

    嘎嘎嘎嘎....楼上某人终于在csdn出现了
      

  3.   

    呵呵……
    有意思???var
      i:integer;
      i:=1000;
      showmessage(datetostr(i));//1902-9-26“类==大米==巨菜巨菜”
      

  4.   

    不知道楼主要把Integer类型转换成Date类型,有何用意思。。
    好像没有非要这么做的必要吧。。??
    可能用字符串转日期不是更方便……
      

  5.   

    function resetdatetime(stocktime:tdatetime):ttime;
      var y, m, d, Hour, Min, Sec, MSec: Word; P:String;i:real;
       begin
       DecodeDatetime(stocktime, y, m, d,Hour,Min,Sec,MSec);
       resetdatetime:= Encodetime(Hour+9,Min,Sec,MSec);
       end;