This week's book giveaway is in the OCAJP forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts2 2.1.8.1 OGNL Timestamp format Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts2 2.1.8.1 OGNL Timestamp format" Watch "Struts2 2.1.8.1 OGNL Timestamp format" New topic
Author

Struts2 2.1.8.1 OGNL Timestamp format

Patrick Kok
Ranch Hand

Joined: Nov 12, 2009
Posts: 42
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

Joined: Nov 12, 2009
Posts: 42
oh, sorry.
I missed the <s:date>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts2 2.1.8.1 OGNL Timestamp format