Here you can find the source of getOffsetDaysTime(Timestamp sysDate, int offsetDays)
public static Timestamp getOffsetDaysTime(Timestamp sysDate, int offsetDays)
//package com.java2s; //License from project: Apache License import java.sql.Timestamp; import java.util.Calendar; public class Main { public static Timestamp getOffsetDaysTime(Timestamp sysDate, int offsetDays) { Calendar calendar = Calendar.getInstance(); calendar.setTime(sysDate);/*from w w w . ja v a 2 s . c om*/ calendar.add(Calendar.DAY_OF_MONTH, offsetDays); return new Timestamp(calendar.getTimeInMillis()); } }