Delphi 5中2个日期之间的差异

d h*_*d h 2 delphi delphi-5

我希望能够在Delphi 5中找到两个TDateTime变量之间的秒数差异.在后续版本的delphi中,有辅助函数SecondsBetween来执行此操作.有没有更好的方法来做这个而不是滚动我自己(找到两个变量的差异,然后将它们转换为秒)?

谢谢.

NGL*_*GLN 6

Secs := Round(SecsPerMin * MinsPerHour * HoursPerDay * Abs(Time2 - Time1));
Run Code Online (Sandbox Code Playgroud)