Show: Delphi C++
Display Preferences

System.DateUtils.HourSpan

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function HourSpan(const ANow, AThen: TDateTime): Double;

C++

extern DELPHI_PACKAGE double __fastcall HourSpan(const System::TDateTime ANow, const System::TDateTime AThen);

Properties

Type Visibility Source Unit Parent
function public
System.DateUtils.pas
System.DateUtils.hpp
System.DateUtils System.DateUtils

Description

Returns the number of hours (including fractional hours) between two specified TDateTime values.

Call HourSpan to obtain the difference, in hours, between two TDateTime values. Unlike the HoursBetween function, which only counts entire hours, HourSpan reports incomplete hours as a fraction of an entire hour.

HourSpan always returns a positive result and therefore the parameter values are interchangeable.

See Also


Code Examples

Personal tools
In Other Languages
Previous Versions
Assistance