This tag in JSTL is used to read(parsing) the Date as per required format Pattern. Attributes That are mandatory to use are avail in this tag like value or pattern. The main attribute Is pattern That will instruct that in which format the date will be displayed.
<%@ taglib prefix=”c” uri=”http://java.sun.com/jsp/jstl/core” %>
<%@ taglib prefix=”fmt” uri=”http://java.sun.com/jsp/jstl/fmt” %>
<html>
<head>
<title><fmt:parseDate> Tag In JSTL</title>
</head
<body>
<b><center><h3>Displaying of Date Parsing In JSTL</h3>
<c:set var=”now” value=”2014-07-29″ />
<fmt:parseDate value=”${now}” var=”p_Date” pattern=”yyyy-mm-dd” />
<b><center><p>Parsed Date: <c:out value=”${p_Date}” /></p></center></b>
</body>
</html>
This program will use To explain the tag <fmt: parsedDate>. The tag library imported first as required as per condition then after declaring some mandatory variable with their respective attributes. The Body of program with HTML and JSTL tags the output is been displayed on the web browser. In the last we close all the tags.