DB2DateTime.AddYears(Int32 years) method

Adds specified years to the DB2DateTime instance.

The DB2DateTime.AddYears(Int32 years) method is available for use only with the Informix® database server.

Namespace:
IBM.Data.DB2Types
Assembly:
IBM.Data.DB2 (in IBM.Data.DB2.dll)

Syntax


[Visual Basic]
Public Shared Function AddYears (years As Int32) As DB2DateTime
[C#]
public DB2DateTime AddYears (Int32 years)
[C++]
public:
DB2DateTime AddYears (Int32 years)
[JScript]
public function AddYears (years Int32) : DB2DateTime

Parameters

years
The number of years that you want to add to the existing DB2DateTime instance.

Return value

A new DB2DateTime structure that consists of the original DB2DateTime instance value plus the number of years that you specified in the years parameter. The year time unit must be specified in the existing DB2DateTime instance.