change format of Dates retreive from ognl

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

change format of Dates retreive from ognl

mlester
Hey I am retrieving a date from ognl via <s:property value='"propertyname of Date"> and when I output the value to the browser it is in the form mm/dd/yy but I want it to be in form mm/dd/yyyy. How can I change it so that its retrieve in that format.
Reply | Threaded
Open this post in threaded view
|

Re: change format of Dates retreive from ognl

vinodkashyap
Administrator
Hi,

Simple; use SimpleDateFormat class of JAVA


Reply | Threaded
Open this post in threaded view
|

Re: change format of Dates retreive from ognl

venkuk
In reply to this post by mlester
Hi,

Use the date tag of struts2

Thx
Venku
Reply | Threaded
Open this post in threaded view
|

Re: change format of Dates retreive from ognl

mlester
Yeah I figured it out this morning thanks for the responses