0
목표 : 입력 유형 텍스트의 문자열을 TIME 유형으로 구문 분석하여 MYSQL 데이터베이스에 삽입합니다.String to Time을 구문 분석하고 mysqldatabase에 삽입
String start= request.getParameter("startp");
System.out.println("start:" +start);
SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
long ms=0;
try {
ms = sdf.parse(start).getTime();
System.out.println(" the value of ms is:" +ms);
} catch (ParseException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
Time ts = new Time(ms);
System.out.println("the value of ts is:" +ts);
- 시작 : 01 : 00 : 00
- java.text의 14
- TS의 값이 12 (난 시작 필드라는 startp의 형태로 실제 입력 값 마녀) .ParseException : 파싱 할 날짜 : 나는 다음과 같은 매개 변수의 데이터베이스 유형을 확인
표시
감사합니다.