You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Bailey, Shane C." <SH...@saic.com> on 2003/07/16 16:46:08 UTC
[OT] Display Time was RE: How to use
I need to display the time difference between two dates. I may be
making this harder than it seems.
My first instinct is to do long timeDiff = date2.getTime() -
date1.getTime() but then how do I get this
millisecond format to display as: "dddaysHHhrsmmminsssecSSms"
meaning "2days12hrs13min23sec15ms",
very confusing I think (how do I set the format string, I mean do
I backslash "dd\daysHH\hrs" etc? how will
the formatter know that the 's' in "days" doesn't mean to display
seconds?
Any suggestions would be great!
TIA
-----Original Message-----
From: Nagendra Kumar O V S [mailto:nagendra@ikigo.com]
Sent: Tuesday, July 15, 2003 6:14 AM
To: struts-user@jakarta.apache.org
Subject: Re: How to use <bean:write format/formatKet>
hi,
u can use <bean:write to format dates and numbers.
for ex. u have action form
private Date date1;
if u want to format that using bean:write
<bean:write name="form" property="date1" format="MM/dd/yyyy"/>
this renders the date using that format(simpledate format)
if u want this format from application resouces , use formatkey which will
get the value from the resources.
--nagi
-------Original Message-------
From: Struts Users Mailing List <ma...@jakarta.apache.org>
Date: Tuesday, July 15, 2003 02:57:30 PM
To: struts-user@jakarta.apache.org <ma...@jakarta.apache.org>
Subject: How to use
Hi ,
Can anybody let me know how to use "bean:write" for formatting the text.
What is the difference between format / formaKey in Bean:write attributes ?
What are all the valid message format texts that I can use in
ApplicationResourse.
Kishore Kumar K
Covansys India Pvt Ltd
*:- Rkishore@Covansys.com <ma...@Covansys.com>
*:- 91-44-22628080-6877
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
<ma...@jakarta.apache.org>
For additional commands, e-mail: struts-user-help@jakarta.apache.org
<ma...@jakarta.apache.org>
.
____________________________________________________
<http://www.incredimail.com/redir.asp?ad_id=309&lang=9> IncrediMail -
Email has finally evolved -
<http://www.incredimail.com/redir.asp?ad_id=309&lang=9> Click Here