Examples of conversion between Timestamp and String types:
String str = "2018-05-06 10:30:40";
//String 转 Timestamp
Timestamp time = Timestamp.valueOf(str);
//Timestamp 转 String
String strn = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(time);