zoukankan      html  css  js  c++  java
  • 页面中EL表达式中的13位毫秒值转为日期

    &nbsp;开始时间:<font color="red" style="display: none;">${mess.startTime}</font>

    首先要引入标签

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

    然后引入时间戳

    <jsp:useBean id="dateValue" class="java.util.Date"/>

    <jsp:setProperty name="dateValue" property="time" value="${mess.startTime }"/>

    最后格式化时间

    <font color="red"><fmt:formatDate value="${dateValue}" type="both" pattern="yyyy-MM-dd HH:mm:ss"/></font>

  • 相关阅读:
    Seven Puzzle Aizu
    Cheese
    Curling 2.0
    Ball
    Property Distribution
    Red and Black
    Lake Counting
    Ants
    剑桥雅思写作高分范文ESSAY20
    剑桥雅思写作高分范文ESSAY19
  • 原文地址:https://www.cnblogs.com/patrick-king/p/11865193.html
Copyright © 2011-2022 走看看