How to get timestamp in string format in Java? \"yyyy.MM.dd.HH.mm.ss\"
String timeStamp = new SimpleDateFormat(\"yyyy.MM.dd.HH.mm.ss\").format(new Timestamp(
Replace
new Timestamp();
with
new java.util.Date()
because there is no default constructor for Timestamp, or you can do it with the method:
new Timestamp(System.currentTimeMillis());