Search code examples
javajspstruts2displaytag

Format Date in Display Tag


Im using Struts2 and Display tag library.

<display:table name="list" pagesize="3">
    <display:column property="date" title="DATE" />         
</display:table>

How to format the date column above? e.g. m/d/yyyy


Solution

  • Use this:

    <display:table name="list" pagesize="3">
        <display:column property="date" title="DATE" format="{0,date,MM/dd/yyyy}" /> 
    </display:table>