String“2014-11-11”转换成timestamp”2014-11-11“```publicstaticTimestampgetTimestamp(Stringtime){Timestampts=newTimestamp(System.currentTimeMillis());try{ts=Timestamp.valueOf(time);System.out.println(ts);}catch(Exceptione){e.printStackTrace();logger.error("String转timeStamp出错");}returnts;}``这样转换报错说timeStamp的格式必须是2013-11-1100:00:00这种的
慕姐8265434
慕莱坞森
相关分类