File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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
 
Similar Threads
SimpleDateformat
Log4j XMLLayout
Timestamp advanced 4 hours
How to convert timeStamp into corresponding date.
Format time in miliseconds using SimpleDateFormatter