日期与时间处理

格式1:2009-12-25 11:57:36

private final SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy年MM月dd日");

string(2009-12-25 11:57:36)


trans_date = Timestamp.valueOf(HTML.analysis_value_safety(billdocument, "-select div.order_flow_left;-select p -index 1;-text", "1970-01-01 00:00:00"));


数据库字段:  Timestamp  trans_date;转化方法:Timestamp .valueof()
Timestamp format must be yyyy-mm-dd hh:mm:ss


格式2:2009-12-25



basic.setUpdate_time(Timestamp.valueOf(update_timeString + " 11:57:36"));

你可能感兴趣的:(Timestamp)