请看下面的代码:
var
tmp1:tdatetime;
dd:string;
begin
tmp:=strtotime('00:50:00');
stp:='00:00:05';
tmp1:=tmp+strtotime(stp);
dd:=timetostr(tmp1);
end;我想将两个时间相加使dd为'00:50:00'该如何写代码?
现在的dd为空。
var
tmp1:tdatetime;
dd:string;
begin
tmp:=strtotime('00:50:00');
stp:='00:00:05';
tmp1:=tmp+strtotime(stp);
dd:=timetostr(tmp1);
end;我想将两个时间相加使dd为'00:50:00'该如何写代码?
现在的dd为空。
var
t:TTime;
begin
t:=strtotime('00:50:00')+strtotime('00:10:05');
showmessage(timetostr(t));
end;
tmp1:ttime;
dd,stp:string;
begin
tmp1:=strtotime('00:50:00');
stp:='00:00:05';
tmp1:=tmp1+strtotime(stp);
dd:=timetostr(tmp1);
end;