jsp页面中格式化展示日期

在jsp页面中,引入

<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

使用方式

<c:forEach items="${requestScope.users}" var="user">
${user.id}-----${user.name}-----${user.age}-----<fmt:formatDate pattern="yyyy/MM/dd" value="${user.bir}"/> <br/>
</c:forEach>

 

posted @ 2019-03-26 15:39  乘着风破万浪  阅读(587)  评论(0编辑  收藏  举报