SimpleDateFormat stampFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); String timeStamp() { Date date = new Date(); return stampFormat.format(date); }
Programming Tips - Java: Make a nice timestamp
Date: 2016nov17
Language: Java
Keywords: log, logging
Q. Java: Make a nice timestamp
A. Use SimpleDateFormat like this: