Return-Path: Delivered-To: apmail-jakarta-struts-user-archive@apache.org Received: (qmail 69904 invoked from network); 1 Jul 2002 11:55:29 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by 209.66.108.5 with SMTP; 1 Jul 2002 11:55:29 -0000 Received: (qmail 2772 invoked by uid 97); 1 Jul 2002 11:55:14 -0000 Delivered-To: qmlist-jakarta-archive-struts-user@jakarta.apache.org Received: (qmail 2713 invoked by uid 97); 1 Jul 2002 11:55:13 -0000 Mailing-List: contact struts-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list struts-user@jakarta.apache.org Received: (qmail 2697 invoked by uid 98); 1 Jul 2002 11:55:12 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) Date: Mon, 1 Jul 2002 04:55:01 -0700 From: Struts Newsgroup (@Basebeans.com) Message-Id: <200207011155.g61Bt1024481@basebeans.com> To: struts-user@jakarta.apache.org Subject: Re: formating X-Spam-Rating: 209.66.108.5 1.6.2 0/1000/N X-Spam-Rating: 209.66.108.5 1.6.2 0/1000/N Subject: Re: formating From: "David Bolsover" === Hi Matthias You don't say in what form your Objects store the datevalue but I'm assuming that you are using java.sql.Date this being the class most easily used for database update/retrieve methods. If you access a from a 'struts' page you will get a date displayed in the form : 2002-07-01 I have solved this display problem by having getDateString() and setDateString(String date) in my forms (your Object?). These methods access the underlying java.sql.Date field and do appropriate conversion from/to a more firendly string format. This should give you the general direction: java.sql.Date sqlDate = new java.sql.Date(System.currentTimeMillis()); DateFormat df = DateFormat.getDateInstance(java.text.DateFormat.MEDIUM Locale.GERMAN); System.out.println(df.format(sqlDate)); regards David david@bolsover.com wrote in message news:mailman.1025510521.19664.struts@basebeans.com... > I've got a Bean which contains an array of Objects. > Each of the containing objects has a datevalue. > > In the JSP I want to display the date localized. > > How do you solve this problem? > Thanks in advance. Matthias > > -------------------------------------------------------------------------- -- > ---------------- > Hanel Matthias > Fachinformatiker (Anwendungsentwicklung) in Ausbildung > Logistik World GmbH Fon: +49-841-9014-300 > Marie-Curie-Strasse 6 Fax: +49-841-9014-302 > D- 85055 Ingolstadt mailto:mhanel@lwplus.de > -------------------------------------------------------------------------- -- > ---------------- > > > -- > To unsubscribe, e-mail: > For additional commands, e-mail: > -- To unsubscribe, e-mail: For additional commands, e-mail: