Here you can find the source of getCurrentDate()
public static String getCurrentDate()
//package com.java2s; //License from project: Open Source License import java.sql.Date; import java.text.SimpleDateFormat; public class Main { static SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd"); public static String getCurrentDate() { Date date = new Date(System.currentTimeMillis()); return DATE_FORMAT.format(date); }/*from w w w . j ava2s . c o m*/ }