Struts2 Date tag display week week like Wed, 13 Feb, 2013 9:00 AM

How can we use struts2 date tag to display below format

Wed, Feb 13, 2013 9:00 am

+3


source to share


4 answers


I know you already got your answer, yes it is

<date name="customDate" format="EEE, d MMM, yyyy h:mm a" />

      



Struts 2 also uses java.text.SimpleDateFormat for the date format, you can see what to see to learn more about that. hope this helps in case you want to use a different custom format in the future. amuses.

+3


source


Use data tag format attribute



<date name="customDate" format="EEE, d MMM, yyyy h:mm a" />

      

0


source


Try this format EEE, dd MMM, yyyy HH:mm aaa

-

<s:date name="customDate" format="EEE, dd MMM, yyyy HH:mm aaa" />

      

0


source


use this tag:, <s:date />

just like this:

<s:date name="#date" format="EEE, d MMM yyyy HH:mm:ss aaa" />

      

0


source







All Articles