jsp 页面中使用jstl el 将long转换为时间类型,并格式化输出

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> <jsp:useBean />
<c:set target="${myDate}" property="time" value="1365532200000"/> <p>Date: ${myDate}</p>
//时间格式化输出 <fmt:formatDate value="${myDate}" pattern="yyyy-MM-dd HH:mm:ss"/>

//输出
2013-04-10 02:30:00

 

 

相关文章:

  • 2021-09-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-29
  • 2021-08-29
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-27
  • 2021-11-30
  • 2021-05-08
  • 2021-04-08
  • 2021-12-03
相关资源
相似解决方案