Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- FileZilla다운로드
- Math.ceil()
- removeClass
- 증가값
- selectedIndex
- push오류
- hide
- excel중복체크
- Git
- 파일질라다운로드
- Math.floor()
- selectoptions
- is_check
- slideUp
- index %
- 파일질라설치
- Excel
- 소스트리인증실패
- Parent
- toFixed()
- calc.plus
- FileZilla설치
- Math.round()
- 파일질라설치오류
- 1521
- 주석이 먹히지 않을 때
- calc.minus
- SUB함수
- ctrl+/
- addClass
Archives
- Today
- Total
잡동사니에도 사랑을
[21.10.07] jstlFormat(jstl) 본문
728x90
반응형
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<fmt:formatNumber type="number" value="123456789" /><br>
<fmt:formatNumber type="number" value="123456789.88" /><br>
<fmt:formatNumber type="number" value="123456789.88" maxFractionDigits="1"/><br>
<br>
<fmt:formatNumber type="number" value="123456.78" pattern="#,###"/><br>
<fmt:formatNumber type="number" value="123456.789" pattern=".##"/><br>
<fmt:formatNumber type="number" value="123456.789" pattern="#,###.##"/><br>
<br>
<fmt:formatNumber type="number" value="0000.00" pattern="#,###.##"/><br>
<fmt:formatNumber type="number" value="0000.00" pattern="0,000.00"/><br> <!-- 강제로 00을 붙여라 -->
<fmt:formatNumber type="number" value="12.3" pattern="000.00"/><br>
<br>
<!-- simple date format 대신 쓰는 방법 -->
<c:set var="now" value="<%=new java.util.Date()%>"/>
<c:out value="${now}"/><br>
date : <fmt:formatDate value="${now}" type="date"/><br>
time : <fmt:formatDate value="${now}" type="time"/><br>
both : <fmt:formatDate value="${now}" type="both"/><br>
<br>
<fmt:formatDate value="${now}" pattern="yy-MM-dd hh:mm" type="both" /><br>
<fmt:formatDate value="${now}" pattern="yy-MM-dd" type="date" /><br>
<fmt:formatDate value="${now}" pattern="yy-MM-dd E요일 a" type="date" /><br>
<fmt:formatDate value="${now}" pattern="HH:mm" type="time" /><br>
<!--
MM : 월 / mm : 분
HH : 24시 / 12 hour format
-->
</body>
</html>
728x90
반응형
'JAVA_EE > EL-JSTL' 카테고리의 다른 글
[21.10.07] jstlInput / jstlResult(jstl) (0) | 2021.10.07 |
---|---|
[21.10.07] jstlExam / jstlTest(jstl) (0) | 2021.10.07 |
[21.10.07] start.jsp / sendProc / sendResult / forwardProc / forwardResult(exam) - 페이지 이동(sendRedirect 와 forward 이용) (0) | 2021.10.07 |
[21.10.06] image.jsp / today.jsp / main.jsp(exam) (0) | 2021.10.07 |
[21.10.06]elInput2.jsp / elResult2.jsp(el) (0) | 2021.10.07 |