Java tutorial
//package com.java2s; import java.text.SimpleDateFormat; public class Main { public static String getCurrentDate() { SimpleDateFormat sDateFormat2 = new SimpleDateFormat("yyyy-MM-dd"); String currenttime = sDateFormat2.format(new java.util.Date()); return currenttime; } }