String转TimeStamp方法如下
DateFormat format = new SimpleDateFormat("yyyyMMddHHmmss");
Timestamp startTime = new Timestamp(format.parse(startDate).getTime());
TimeStamp转String
String nowDate = new SimpleDateFormat("yyyyMMdd").format(nowTimeStamp);
String转TimeStamp方法如下
DateFormat format = new SimpleDateFormat("yyyyMMddHHmmss");
Timestamp startTime = new Timestamp(format.parse(startDate).getTime());
TimeStamp转String
String nowDate = new SimpleDateFormat("yyyyMMdd").format(nowTimeStamp);