Here you can find the source of getTimestamp(String format, Integer daysInFuture)
public static String getTimestamp(String format, Integer daysInFuture)
//package com.java2s; //License from project: Open Source License import java.text.SimpleDateFormat; import java.util.Calendar; public class Main { public static String getTimestamp(String format, Integer daysInFuture) { Calendar c = Calendar.getInstance(); if (daysInFuture != null) c.add(Calendar.DAY_OF_YEAR, daysInFuture); return new SimpleDateFormat(format).format(c.getTime()); }/*from w ww .j a v a 2s .c o m*/ public static String getTimestamp() { return getTimestamp("yyyyMMddHHmmss", null); } }