Here you can find the source of addYearsToDate(java.sql.Date date, int years)
public static java.sql.Date addYearsToDate(java.sql.Date date, int years)
//package com.java2s; //License from project: Open Source License import java.util.Calendar; public class Main { public static java.sql.Date addYearsToDate(java.sql.Date date, int years) { java.sql.Date logicalDate; Calendar c = Calendar.getInstance(); c.setTime(date);//from ww w. ja va2 s . c o m c.add(Calendar.YEAR, years); return new java.sql.Date(c.getTimeInMillis()); } }