Nothing of the kind in the link to Sruts tags . However, you can use the JSTL tag fmt:formatDatefor this. JSTL and Struts1 almost go hand in hand.
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
...
<p><fmt:formatDate value="${bean.date}" pattern="yyyy-MM-dd" />
<p><fmt:formatDate value="${bean.date}" type="date" dateStyle="long" />
Which should print as:
2010-06-18
June 18, 2010
He uses java.text.SimpleDateFormatunder the hoods. His Javadoc describes in more detail the available templates and styles.
source
share