Here you can find the source of getTodayAndTime()
static public String getTodayAndTime()
//package com.java2s; //License from project: Open Source License import java.sql.Timestamp; public class Main { static public String getTodayAndTime() { return new Timestamp(System.currentTimeMillis()).toString(); }/*from w ww . ja v a2 s. co m*/ }