struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Chaimungkalanont" <mark.chaimungkalan...@au1.ibm.com>
Subject RE: date format
Date Tue, 18 Feb 2003 02:05:29 GMT

Going for a "neat" solution, in our project, we tried extending sql.Date
and overwriting the toString method to output a date formatted with
SimpleDateFormat in dd/MM/yyyy format, We then used this data type as our
Date type in our data beans so that when you do a bean:write on it, it will
output the date in the correct format

Unfortunately, we were using scaffold StorageBaseBean findCollection to get
our data and for some reason or another, it was having some casting issues.

We had to resort to creating xxxString version of the dates in the data
bean that converts the dats into their correct format before returning the
string

cheers

MC


                                                                                         
                                             
                      "Desmond"                                                          
                                             
                      <ykwong@makmal.ne        To:       "Struts Users Mailing List" <struts-user@jakarta.apache.org>
                 
                      t>                       cc:                                    
                                                
                                               Subject:  RE: date format                 
                                             
                      19/02/2003 04:03                                                   
                                             
                      AM                                                                 
                                             
                      Please respond to                                                  
                                             
                      "Struts Users                                                      
                                             
                      Mailing List"                                                      
                                             
                                                                                         
                                             
                                                                                         
                                             



Use the SimpleDateFormat to do it so. Refer this webpage
http://java.sun.com/docs/books/tutorial/i18n/format/simpleDateFormat.html

-----Original Message-----
From: usha [mailto:usha@justcommodity.com]
Sent: Monday, February 17, 2003 3:38 AM
To: struts-user@jakarta.apache.org
Subject: date format


Hi

i need to display the date fields on the jsp in the format dd/MMM/yyyy.
is there any simple way i can get this like configuration or writing any
class etc.. if anybody has any ideas plz help me

Thanks
usha


---------------------------------------------------------------------
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






---------------------------------------------------------------------
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