SimpleDateFormat를 string을 date 포멧의 string으로 변환
날짜를 표현한 숫자만의 string을 원하는 날짜 형식의 format을 적용한 날짜 string으로 변환하는 간단한 방법. SimpleDateFormat을 사용하면됩니다. 예를 들어 "20071112143302"을 "2007-11-12 14:33:02" 이렇게 변화하는 간단한 방법은 다음과 같습니다. String dateStr = new String("20071112143302"); SimpleDateFormat format = new SimpleDateFormat("yyyyMMddHHmmss" ,Locale.KOREA); SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss" ,Locale.KOREA); String chgString..
Programming
2007. 11. 13. 10:02