| [Overview][Constants][Procedures and functions][Index] | 
Increase a DateTime value with a number of years.
Source position: dateutil.inc line 284
| function IncYear( | 
| const AValue: TDateTime; | 
| const ANumberOfYears: Integer | 
| ):TDateTime; | 
| const AValue: TDateTime | 
| ):TDateTime; | 
| AValue | 
 | DateTime to which years should be added. | 
| ANumberOfYears | 
 | Number of years to add | 
DateTime representing AValue plus ANumberOfYears years.
| AValue | 
 | DateTime to which years should be added. | 
IncYear adds ANumberOfYears years to AValue and returns the resulting date/time. ANumberOfYears can be positive or negative.
| 
 | Increases the month in a TDateTime value with a given amount. | |
| 
 | Increase a DateTime value with a number of weeks. | |
| 
 | Increase a DateTime value with a number of days. | |
| 
 | Increase a DateTime value with a number of hours. | |
| 
 | Increase a DateTime value with a number of minutes. | |
| 
 | Increase a DateTime value with a number of seconds. | |
| 
 | Increase a DateTime value with a number of milliseconds. | 
Program Example71; { This program demonstrates the IncYear function } Uses SysUtils,DateUtils; Begin Writeln('One year from today is ',DateToStr(IncYear(Today,1))); Writeln('One year ago from today is ',DateToStr(IncYear(Today,-1))); End.