Received: from localhost (IDENT:root@hectic-2.jpl.nasa.gov [128.149.68.204]) by hub.org (8.9.3/8.9.3) with ESMTP id OAA76424 for ; Mon, 10 May 1999 14:02:21 -0400 (EDT) (envelope-from lockhart@alumni.caltech.edu) Received: from alumni.caltech.edu (lockhart@localhost [127.0.0.1]) by localhost (8.8.7/8.8.7) with ESMTP id SAA15295; Mon, 10 May 1999 18:04:06 GMT Sender: lockhart@hub.org Message-ID: <37371F96.6A420D76@alumni.caltech.edu> Date: Mon, 10 May 1999 18:04:06 +0000 From: Thomas Lockhart X-Mailer: Mozilla 4.51 [en] (X11; I; Linux 2.0.36 i686) X-Accept-Language: en MIME-Version: 1.0 To: "Adam H. Pendleton" CC: pgsql-interfaces@hub.org Subject: Re: [INTERFACES] Java and PGSQL date question References: <001f01be9b03$64b82730$bdd0be80@belvoir.army.mil> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit > I am trying to pass a date from Java into a PostgreSQL database. I am using > the DateFormat.parse() funcitonality to format the date. However, the > database doesn't want to take it? I looked at the PGSQL documentation and > it says that the default date type is postgresql date type, which is: Wed > Dec 17 07:37:16 1997 PST. Java is sending the date in this format: Wed Dec > 17 07:37:16 PST 1997. How do I make this work. Is it easier to change the > Java format or the PGSQL format? postgres=> select 'Wed Dec 17 07:37:16 PST 1997'::datetime; ?column? ---------------------------- Wed Dec 17 15:37:16 1997 UTC (1 row) Looks good to me. Does this work from psql on your db? If so, then the problem lies elsewhere... - Tom -- Thomas Lockhart lockhart@alumni.caltech.edu South Pasadena, California