본문 바로가기

DEV/JAVA

formatDate 12/24시간 설정

반응형
<jsp:useBean id="today" class="java.util.Date" />
<fmt:formatDate value="${today}" var="day" type="DATE" pattern="yyyy/MM/dd HH:mm" /> <!-- 24시간제 -->

<fmt:formatDate value="${today}" var="day" type="DATE" pattern="yyyy/MM/dd hh:mm" /> <!-- 12시간제 -->


반응형
댓글