System.DateUtils.EndOfAMonth

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function EndOfAMonth(const AYear, AMonth: Word): TDateTime;

C++

extern DELPHI_PACKAGE System::TDateTime __fastcall EndOfAMonth(const System::Word AYear, const System::Word AMonth);

Properties

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

Description

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

EndOfAMonth returns the last expressible moment (11:59:59.999 P.M.) of the last day of a specified month.

The AYear parameter specifies the year of the desired month.

The AMonth parameter specifies the month. It can range from 1 through 12.

If the parameters do not specify a valid month, EndOfAMonth raises an EConvertError exception.

See Also


Code Examples