RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
DateUtils.EndOfTheMonth Function

Returns a TDateTime that represents the last millisecond of the last day of the month identified by a specified TDateTime.

Pascal
function EndOfTheMonth(const AValue: TDateTime): TDateTime;
C++
TDateTime EndOfTheMonth(const TDateTime AValue);

EndOfTheMonth returns the last expressible moment of the same month as the TDateTime specified by AValue. That is, it replaces the time portion of AValue with 11:59:59.999 PM, changes the day to the last day of the month, and returns the result. 

 

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