Received: from candle.pha.pa.us (candle.navpoint.com [162.33.245.46]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f48GiVA52958; Tue, 8 May 2001 12:44:32 -0400 (EDT) (envelope-from pgman@candle.pha.pa.us) Received: (from pgman@localhost) by candle.pha.pa.us (8.10.1/8.10.1) id f48GiPH09382; Tue, 8 May 2001 12:44:25 -0400 (EDT) From: Bruce Momjian Message-Id: <200105081644.f48GiPH09382@candle.pha.pa.us> Subject: Re: [JDBC] Re: Trouble with JDBC2 ResultSet.getDate() In-Reply-To: <3AF82237.95BFE0BA@partitur.se> "from Palle Girgensohn at May 8, 2001 06:43:35 pm" To: Palle Girgensohn Date: Tue, 8 May 2001 12:44:24 -0400 (EDT) CC: Juhan-Peep Ernits , pgsql-interfaces@postgresql.org, pgsql-jdbc@postgresql.org X-Mailer: ELM [version 2.4ME+ PL90 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Archive-Number: 200105/34 X-Sequence-Number: 1560 > Well, I didn't see the patch, but my message (probably you just > received) points to the fact that getDate shall work on a > timestamp column, and some kind of patch shall be applied. I > something like this: > > if s.length() == 10 > return java.sql.Date.valueOf(s) > else do the old 7.0.3 SimpleDateFormatter stuff. > > *or* > > try { > return java.sql.Date.valueOf(s) > } catch (SQLException e) { > do the old SimpleDateFormatter stuff... > } > > sort of... gotta go, or I'd have sent you a full patch. Would you, please? Thanks. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026