0

my jsp gonna load data from table and one of my table's column is date which saved in datetime 2017-09-26 00:00:00.0

how do I display only date 2017-09-26 on jsp?

illimite
  • 99
  • 1
  • 13

1 Answers1

0

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

and give it a pattern

<fmt:formatDate value="${bean.date}" pattern="yyyy-MM-dd HH:mm:ss" />

source: Convert and format a Date in JSP

illimite
  • 99
  • 1
  • 13