Here you can find the source of getCurrentDate()
public static String getCurrentDate()
//package com.java2s; import java.sql.Date; import java.text.SimpleDateFormat; public class Main { public final static String DATE_FORMAT_yyyy_MM_dd = "yyyy-MM-dd"; /**// w w w . jav a 2 s .c o m * Get current date's string * @return */ public static String getCurrentDate() { return new SimpleDateFormat(DATE_FORMAT_yyyy_MM_dd).format(new Date(System.currentTimeMillis())); } }