struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Abhijeet Mahalkar" <Abhijeet.Mahal...@indussoft.com>
Subject Re: <bean:write property=""> Format a Date ?
Date Wed, 17 Sep 2003 12:45:28 GMT
I don't thing struts provide you formating date functionality as i never tried also but frankly
it will take another 20 min. to write a function for formatting date..
use string.substring methods and all after retriving the date from DB using getStirng()
or use to_char(datefield,'dd/mm/yyyy hh24:mi:ss') or any other format u want. and if you are
working with Java Date  class then calculate the long value of that with 

String s  = date.getDay()+"/"+ getMonth()+"/"getYear() functions it's really simple...

regards
abhijeet

----- Original Message ----- 
From: <reps@grass-gmbh.de>
To: "Struts-User" <struts-user@jakarta.apache.org>
Sent: Wednesday, September 17, 2003 6:00 PM
Subject: <bean:write property=""> Format a Date ?


one of my Bean propertys is a Date and i want to output it formated,
is there a way to do that with struts ?


Mit freundlichen Grüßen

Christian Reps, Dipl. Inf. (FH)
Web Applications


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message