How do I formate a java.sql Timestamp to my liking ? ( to a string, for display purposes)
java.sql.Timestamp
extends java.util.Date
. You can do:
String s = new SimpleDateFormat("MM/dd/yyyy").format(myTimestamp);
Or to also include time:
String s = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss").format(myTimestamp);