Is it possible to convert/format java.sql.Timestmap
into a String that has the following format:
yyyyMMdd
I know that doing it with a String
is fairly simple e.g:
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 have to work with the Timestamp
object.