Here you can find the source of getNowInputDate()
public static String getNowInputDate()
//package com.java2s; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static final String DATE_FORMAT_INPUT_PAGE = "yyyyMMdd"; /**//from www . j a v a 2s . c o m * get now day format : yyyyMMdd * * @return */ public static String getNowInputDate() { return timeToString(DATE_FORMAT_INPUT_PAGE, new Date()); } public static String timeToString(String format, Date date) { DateFormat df = new SimpleDateFormat(format); return df.format(date); } }