aa:array[0..5] of byte;
 秒  分  时  日  月  年   这个格式放入这6个字节中,
请教如何解决,非常感谢!

解决方案 »

  1.   

    byte类型8位,如果是无符号数0~255
    但是我们的2005年怎么保存进去那,搂主!!!?
      

  2.   

    var
       dt:TDateTime;
       Year,Month,Day,Hour,Min,Sec,MSec:Word;
       aa:array[0..5] of byte;
    begin
       dt:=Now;
       DecodeDate(dt,Year,Month,Day)
       DecodeTime(dt,Hour,Min,Sec,MSec);
       Year:=Year mod 100;
       aa[0]:=Byte(Sec);
       aa[1]:=Byte(Min);
       aa[2]:=Byte(Hour);
       aa[3]:=Byte(Day);
       aa[4]:=Byte(Month);
       aa[5]:=Byte(Year);
    end;
      

  3.   

    2005-------------->05
    1905-------------->05
    ……
    2105-------------->05