Java tutorial
//package com.java2s; //License from project: Apache License import java.sql.Date; import java.text.SimpleDateFormat; public class Main { public static String getNowDate() { SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd"); Date date = new Date(System.currentTimeMillis()); return sf.format(date); } }