Y yujiu2000 Unregistered / Unconfirmed GUEST, unregistred user! 2003-12-20 #1 假设有两个时间:dtp2.DateTime,dtp1.DateTime, 相差 dd:=dtp2.DateTime -dtp1.DateTime ; 得到相应的(*时*分*秒)
D dedema Unregistered / Unconfirmed GUEST, unregistred user! 2003-12-20 #2 DecodeTime(dd,Hours,Minutes,Seconds,Milliseconds)
寻 寻找 Unregistered / Unconfirmed GUEST, unregistred user! 2003-12-20 #3 自己作個函數吧, 用分割decodetime函數把兩個時間的時,分,秒,分割出來, 再相減,
M miaofeng Unregistered / Unconfirmed GUEST, unregistred user! 2003-12-20 #4 如果你使用的是Delphi7,在DateUtils单元中有如下函数可以容易的得到你需要的结果: function HoursBetween(const ANow, AThen: TDateTime): Int64; function MinutesBetween(const ANow, AThen: TDateTime): Int64; function SecondsBetween(const ANow, AThen: TDateTime): Int64;
如果你使用的是Delphi7,在DateUtils单元中有如下函数可以容易的得到你需要的结果: function HoursBetween(const ANow, AThen: TDateTime): Int64; function MinutesBetween(const ANow, AThen: TDateTime): Int64; function SecondsBetween(const ANow, AThen: TDateTime): Int64;
L lichdr Unregistered / Unconfirmed GUEST, unregistred user! 2003-12-20 #5 如樓上所說的就可以了。 DELPHI自帶了分解的函數的。不但能分解時分秒,還能分解出年月日。 Returns Year, Month, Day, Hour, Minute, Second, and Millisecond values for a TDateTime. Unit DateUtils Category datetime routines Delphi syntax: procedure DecodeDateTime(const AValue: TDateTime; out AYear, AMonth, ADay, AHour, AMinute, ASecond, AMilliSecond: Word);
如樓上所說的就可以了。 DELPHI自帶了分解的函數的。不但能分解時分秒,還能分解出年月日。 Returns Year, Month, Day, Hour, Minute, Second, and Millisecond values for a TDateTime. Unit DateUtils Category datetime routines Delphi syntax: procedure DecodeDateTime(const AValue: TDateTime; out AYear, AMonth, ADay, AHour, AMinute, ASecond, AMilliSecond: Word);
Y yostgxf Unregistered / Unconfirmed GUEST, unregistred user! 2003-12-20 #6 在delphi中自带了一个DateUtils单元,里面有各种计算时间的函数。