String dateFormat="Timestamp";
String timeVal ="2015-11-13 05:30:00.0";
return new SimpleDateFormat(dateFormat).format(new Date((((Timestamp) timeVal).getTime())));
Instead of
String dateFormat="Timestamp";
use
String dateFormat="yyyy-MM-dd HH:mm:ss";
If your date is like
String timeVal ="2015-11-13 05:30:00";
Here you must use date and time format of your date and time.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.