System.SysUtils.IncMonth

From Appmethod Libraries
Jump to: navigation, search

Object Pascal

function IncMonth(const DateTime: TDateTime; NumberOfMonths: Integer): TDateTime;

C++

extern DELPHI_PACKAGE System::TDateTime __fastcall IncMonth(const System::TDateTime DateTime, int NumberOfMonths = 0x1);

Properties

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

Description

Returns a date shifted by a specified number of months.

IncMonth returns the value of the Date parameter, incremented by NumberOfMonths months. NumberOfMonths can be negative, to return a date N months previous.

If the input day of month is greater than the last day of the resulting month, the day is set to the last day of the resulting month. The time of day specified by the Date parameter is copied to the result.

See Also