Formatter formatter = new Formatter();
formatter.format("%tY-%<tm-%<td %<tp %<tH:%<tI:%<tM \n", new Date());
formatter.format("%tB %<tb %<tA %<ta \n", new Date());
formatter.format(Locale.US, "%tY-%<tm-%<td %<tp %<tH:%<tI:%<tM \n", new Date());
formatter.format(Locale.US, "%tB %<tb %<tA %<ta \n", new Date());
formatter.format("%tF %<tT \n", new Date());
System.out.println(formatter.toString());
2013-05-21 오후 17:05:52
5월 5월 화요일 화
2013-05-21 pm 17:05:52
May May Tuesday Tue
2013-05-21 17:52:32
'JAVA' 카테고리의 다른 글
[출처] System.getProperty(시스템 환경변수)|작성자 joypheonix (0) | 2013.06.26 |
---|---|
for문 ":" 정리 (0) | 2013.06.25 |
[펌]xpath 를 이용, java 에서 xml 문서 쉽게 파싱하기 (0) | 2013.06.13 |
Log4j 로그 두번찍히는 문제 (0) | 2013.06.05 |
로그 성능 관련 isDebugEnabled (0) | 2013.06.04 |