DateUtils.MonthSpan
From RAD Studio VCL Reference
Contents |
Delphi Information
From DateUtils.pas
function MonthSpan(const ANow: TDateTime; const AThen: TDateTime): Double;
Unit: DateUtils
Type: function
Visibility: public
C++ Information
From DateUtils.hpp
double __fastcall MonthSpan(System::TDateTime ANow, System::TDateTime AThen);
Unit: DateUtils
Type: function
Description
Returns the approximate number of months, including fractions, between two specified TDateTime values.
Call MonthSpan to obtain the difference, in months, between two TDateTime values. Because months are not all the same length, MonthsBetween returns an approximation based on an assumption of 30.4375 days per month. Unlike the MonthsBetween function, which does not report fractional months, MonthSpan reports incomplete months as a fraction of an entire month.
See Also
Code Samples