• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts2 2.1.8.1 OGNL Timestamp format

 
Patrick Kok
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
How can I format a Timestamp attribute in OGNL?

public Timestamp getMyTimeValue(){
return new Timestamp(new Date().getTime())
}

...

<s:property value="myTimeValue" escape="true"/>

It returns to 1/15/10 12:46:39 PM.000

But I want to be dd/MM/yyyy hh:mm:ss aa

Please help
 
Patrick Kok
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oh, sorry.
I missed the <s:date>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic