DateUtils.HoursBetween
From RAD Studio VCL Reference
Contents |
Delphi Information
From DateUtils.pas
function HoursBetween(const ANow: TDateTime; const AThen: TDateTime): Int64;
Unit: DateUtils
Type: function
Visibility: public
C++ Information
From DateUtils.hpp
__int64 __fastcall HoursBetween(System::TDateTime ANow, System::TDateTime AThen);
Unit: DateUtils
Type: function
Description
Returns the number of whole hours between two specified TDateTime values.
Call HoursBetween to obtain the difference, in hours, between two TDateTime values. HoursBetween counts only entire hours. Thus, HoursBetween reports the difference between 9:00 A.M. and 9:59:59 A.M. as 0 because the difference is one second short of an entire hour.
See Also
Code Samples