关于日期+时间拼接的问题。
①日期格式 2011-09:19 时间格式08:30:00
数据库 字段类型 datetime
private Timestamp startTime;private String startTime1;Timestamp tsb1 = getStartTime();String beginDateTime = tsb1 +""+ getStartTime1();Timestamp ti = Tool.string2Time(beginDateTime);
public static Timestamp string2Time(String dateString) throws java.text.ParseException { DateFormat dateFormat; dateFormat = new SimpleDateFormat("yyyy-MM-dd",Locale.CHINESE); dateFormat.setLenient(false); Date timeDate = dateFormat.parse(dateString); Timestamp dateTime = new Timestamp(timeDate.getTime()); return dateTime; }<select style="width: 45px; height: 20px; padding-top: 2px;" name="startTime1" id="startTime1" > <option value="08:30:30"> 08:30 </option> <option value="09:00:00"> 09:00 </option> <option value="09:30:00"> 09:30 </option></select>