C Calvin Unregistered / Unconfirmed GUEST, unregistred user! 2000-06-22 #2 procedure TForm1.Button1Click(Sender: TObject); var Time1,Time2:TTime; begin Time1:=Now; Sleep(5000); Time2:=Now; Edit1.Text:=TimeToStr(Time2-Time1); end;
procedure TForm1.Button1Click(Sender: TObject); var Time1,Time2:TTime; begin Time1:=Now; Sleep(5000); Time2:=Now; Edit1.Text:=TimeToStr(Time2-Time1); end;
P popeye Unregistered / Unconfirmed GUEST, unregistred user! 2000-06-22 #4 两个时间直接相减,整数部分是相差的天数.小数是毫秒数?不确定. 也可以用encodedate,decodedate,encodetime,decodetime
C Calvin Unregistered / Unconfirmed GUEST, unregistred user! 2000-06-22 #6 procedure TForm1.Button1Click(Sender: TObject); var Time1,Time2:TTime; begin Time1:=StrToTime('10:05:00'); Time2:=StrToTime('09:00:00'); Edit1.Text:=TimeToStr(Time1-Time2); end;
procedure TForm1.Button1Click(Sender: TObject); var Time1,Time2:TTime; begin Time1:=StrToTime('10:05:00'); Time2:=StrToTime('09:00:00'); Edit1.Text:=TimeToStr(Time1-Time2); end;
W wumeng Unregistered / Unconfirmed GUEST, unregistred user! 2000-06-23 #7 G:Calvin procedure TForm1.Button1Click(Sender: TObject); var Time1,Time2:TTime; Rresult:real; begin Time1:=StrToTime('10:05:00'); Time2:=StrToTime('09:00:00'); Rresult:=Time1-Time2; end; //Rresult-->天数
G:Calvin procedure TForm1.Button1Click(Sender: TObject); var Time1,Time2:TTime; Rresult:real; begin Time1:=StrToTime('10:05:00'); Time2:=StrToTime('09:00:00'); Rresult:=Time1-Time2; end; //Rresult-->天数
俊 俊妮 Unregistered / Unconfirmed GUEST, unregistred user! 2000-06-23 #8 function ftime(t1,t2:ttime):double; begin result:=t1-t2; end;
D Dick Unregistered / Unconfirmed GUEST, unregistred user! 2000-06-24 #9 如果是数据库端的日期加减,好象有十分强大的SQL函数,记得好象是 datebetween什么的,可以计算任意两个日期之间差的时、分、秒。
W wjiachun Unregistered / Unconfirmed GUEST, unregistred user! 2000-07-28 #11 不要怪别人不理你,看看你自己能记住自己的帐号么?? 说说,shuoshuo,sh1,sh2……,sh8,sh9…… 该结束的题自己结束吧!!!!!!