SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Timestamp timestamp =(Timestamp)user.get("lastaccept_time"); //2016-05-12 12:23:12.0 java.util.Date date=null; if (timestamp!=null){ date = new java.util.Date(timestamp.getTime()); }String timeLastaccept1 = formatter.format(date);
user.put("lastaccept_time",timeLastaccept1);