Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YBzYy-0006Pa-Ak for pgsql-jdbc@arkaria.postgresql.org; Fri, 16 Jan 2015 05:35:16 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YBzYx-0000Ej-EI for pgsql-jdbc@arkaria.postgresql.org; Fri, 16 Jan 2015 05:35:15 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YBzYw-0000Dc-Hm for pgsql-jdbc@postgresql.org; Fri, 16 Jan 2015 05:35:14 +0000 Received: from mwork.nabble.com ([162.253.133.43]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YBzYr-0005AX-Sy for pgsql-jdbc@postgresql.org; Fri, 16 Jan 2015 05:35:12 +0000 Received: from msam.nabble.com (unknown [162.253.133.85]) by mwork.nabble.com (Postfix) with ESMTP id 7839010B0EF7 for ; Thu, 15 Jan 2015 21:35:08 -0800 (PST) Date: Thu, 15 Jan 2015 22:35:06 -0700 (MST) From: Vinayak To: pgsql-jdbc@postgresql.org Message-ID: <1421386506791-5834215.post@n5.nabble.com> In-Reply-To: References: <1420546864196-5833008.post@n5.nabble.com> <1421061400959-5833623.post@n5.nabble.com> <1421123270940-5833702.post@n5.nabble.com> <1421131374401-5833708.post@n5.nabble.com> <1421213697306-5833860.post@n5.nabble.com> Subject: Re: Problem with DATE MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -0.3 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org Hi Dave, Thank you for explanation. I understood that the behavior of date is different in PostgreSQL and Java. PostgreSQL DATE type return date part only. Java DATE return date and time with timezone. >I am guessing what you really want is to just take the date in your Oracle db, load it into java and store >it into postgresql without any transformation. >This would require a custom date type. I have created custom date type which return date and time in PostgreSQL. postgres=# select now()::date; now --------------------------------- 2015-01-16 10:51:41 (1 row) but still PreparedStatement throws error for date parameter. ----- Regards, Vinayak, -- View this message in context: http://postgresql.nabble.com/Problem-with-DATE-tp5833008p5834215.html Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com. -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc