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(
Use java.util.Date class instead of Timestamp.
java.util.Date
String timeStamp = new SimpleDateFormat("yyyy.MM.dd.HH.mm.ss").format(new Date());
This will get you the current date in the format specified.