wood burning stoves
The moose likes Struts and the fly likes timestamp display problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "timestamp display problem" Watch "timestamp display problem" New topic

timestamp display problem

arjun rampal
Ranch Hand

Joined: Jul 08, 2005
Posts: 125
Hi on jsp using struts page I am displaying the timestamp


Now rather than showing all values I wish to show only 07:20:16 means no date and no last 0 which is indiacating nanao seconds.

Now substring was option but the value returned is date here not string
Arulanand Dayalan
Ranch Hand

Joined: Aug 10, 2005
Posts: 124
Use the formatkey property of Bean:Write

<bean:write property="test" name="testform" formatKey="formatkey"/>

Could be specified in the property file or directly specfied.

formatkey = "MM/dd/yyyy";
arjun rampal
Ranch Hand

Joined: Jul 08, 2005
Posts: 125

<td><bean:write name="detail" property="aTime" formatKey="org.apache.struts.taglib.bean.format.sql.timestamp" /></td>

and value in application properties like this


YA and after doing this restart your IDE
(use hh for 12 hour and HH FOR 24 HOUR)
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864

Please don't post the same question in multiple forums. It wastes the time of people responding to your question. This same question was posted by you in the JSP forum.

Consultant, Sima Solutions
I agree. Here's the link: http://aspose.com/file-tools
subject: timestamp display problem
It's not a secret anymore!