Is it possible to convert / format java.sql.Timestmap into a string that has the following format:
yyyymmdd
I know that doing this with String pretty simple, like this:
String dateString = "2016-02-03 00:00:00.0"; Date date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.S").parse(dateString); String formattedDate = new SimpleDateFormat("yyyyMMdd").format(date);
But I need to work with a Timestamp object.
source share