1. Home
  2. Computing & Technology
  3. Delphi Programming
Glossary|Tips/Tricks|FREE App/VCL|Essentials|Books|Link Back

Delphi Programming RTL Reference|By Category|Alphabetically|By Unit
 

IncMonth

unit
Sysutils
category
date/time routines

declaration
function IncMonth(Date: TDateTime; Months: Integer) : TDateTime;

description
Adds or substracts a given number of months from a date value.

The Time part of day specified by the Date parameter is copied to the result.

example
var Date: TDateTime;

EncodeDate(Date, 2000, 1, 31) //January 31, 2000
IncMonth(Date, 1)

//February 28, 2001
//IncMonth won't return
//an invalid date, of course. 

in real code

see also
EncodeDate, IncAMonth, IncDay


 Free Delphi code snippet inside every Delphi Newsletter!
Subscribe to the Newsletter
Name
Email

 Got some code to share? Got a question? Need some help?
Explore Delphi Programming
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Delphi Programming

©2009 About.com, a part of The New York Times Company.

All rights reserved.