자바(JAVA) 형 변환(String to Date, Date to String)
String to Date
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
Date from = new Date();
SimpleDateFormat transFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String to = transFormat.format(from);
source.> http://nota.tistory.com/50
'◆ 무한한 가능성 > & JAVA' 카테고리의 다른 글
서블릿(자바,JAVA)에서 JSP를 호출 (0) | 2017.02.22 |
---|---|
Excel Export in Spring MVC. 자바 스프링에서 엑셀저장 엑셀다운로드 (0) | 2016.05.15 |
JAVA ini 파일 읽고 쓰기 (0) | 2016.03.17 |
JAVA - 한글 인코딩 변환 체크 한방에 끝내기 (0) | 2016.03.13 |
RESTful (0) | 2015.05.19 |