Here you can find the source of getNextTimestamp(Timestamp previous, long nrDays)
public static Timestamp getNextTimestamp(Timestamp previous, long nrDays)
//package com.java2s; /******************************************************************************* * Copyright (c) 2010 Torsten Zesch.//from www. j a va 2s. c o m * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Lesser Public License v3 * which accompanies this distribution, and is available at * http://www.gnu.org/licenses/lgpl.html * * Contributors: * Torsten Zesch - initial API and implementation ******************************************************************************/ import java.sql.Timestamp; public class Main { public static Timestamp getNextTimestamp(Timestamp previous, long nrDays) { return new Timestamp(previous.getTime() + (nrDays * 24 * 60 * 60 * 1000)); } }