日期:2014-05-18 浏览次数:20837 次
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>