X xiaoren Unregistered / Unconfirmed GUEST, unregistred user! 1999-04-29 #1 我要把是时间如: 19:23:12 加上 2:00 怎么办?
茶 茶叶蛋 Unregistered / Unconfirmed GUEST, unregistred user! 1999-04-29 #2 这样作: var ti : TTime; hour, min, sec, msec : word; begin ti := Now; Decodetime( ti, hour, min, sec, msec ); hour := hour + 2; ti := Encodetime( hour, min, sec, msec ); Label1.Caption := TimeToStr( ti ); end;
这样作: var ti : TTime; hour, min, sec, msec : word; begin ti := Now; Decodetime( ti, hour, min, sec, msec ); hour := hour + 2; ti := Encodetime( hour, min, sec, msec ); Label1.Caption := TimeToStr( ti ); end;