java25 [JAVA] String to Date, Date to String 형변환 String to Date 1 2 3 4 5 String from = "2013-04-08 10:10:10"; SimpleDateFormat transFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Date to = transFormat.parse(from); Date to String 1 2 3 4 5 Date from = new Date(); SimpleDateFormat transFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); String to = transFormat.format(from); 2018. 10. 28. 이전 1 2 3 다음