Here you can find the source of timestampPlusDay(java.sql.Timestamp ts, int iDayPlus)
public static long timestampPlusDay(java.sql.Timestamp ts, int iDayPlus)
//package com.java2s; public class Main { public static long timestampPlusDay(java.sql.Timestamp ts, int iDayPlus) { if (ts == null) { return -1; }/*w w w . j av a 2 s .c om*/ java.util.Calendar calendar = java.util.Calendar.getInstance(); calendar.setTimeInMillis(ts.getTime()); int iDay = calendar.get(calendar.DAY_OF_MONTH); calendar.set(calendar.DAY_OF_MONTH, iDay + iDayPlus); java.sql.Timestamp tsNew = new java.sql.Timestamp((calendar.getTime()).getTime()); return tsNew.getTime(); } }