Custom Tag to Convert String to Date Variable
843838Jan 31 2006 — edited Feb 1 2006Greetings,
Does anyone know of a custom tag which converts a String to a Date variable?
I am retrieving a String from a bean, format dd/MM/yyyy and passing it to a tag which formats it for output. But so far I haven't been unable to avoid putting a real-time expression to do a Date conversion first:
<fmt:formatDate type="date" value='<%=new Date((String)(pageContext.getAttribute("myBeanDatePropertyAsAString"))) %>' pattern="EEEE d MMMM yyyy"/>
Surely there must be a better way which avoids putting Java into my tag?
Thanks,
Lloyd