RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
DateUtils.WeekSpan Function

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

Pascal
function WeekSpan(const ANow: TDateTime; const AThen: TDateTime): Double;
C++
Double WeekSpan(const TDateTime ANow, const TDateTime AThen);

Call WeekSpan to obtain the difference, in weeks, between two TDateTime values. Unlike the WeeksBetween function, which only counts whole weeks, WeekSpan reports incomplete weeks as a fraction of an entire week. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!