X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 60955474E44 for ; Wed, 5 Feb 2003 23:23:03 -0500 (EST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id AB02F474E42 for ; Wed, 5 Feb 2003 23:23:02 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.6/8.12.6) with ESMTP id h164Mv5u009134; Wed, 5 Feb 2003 23:22:58 -0500 (EST) To: rodgerd@diaspora.gen.nz Cc: pgsql-sql@postgresql.org Subject: Re: to_date has beaten me... In-reply-to: <20030206040247.GA8032@diaspora.gen.nz> References: <20030206040247.GA8032@diaspora.gen.nz> Comments: In-reply-to Rodger Donaldson message dated "Thu, 06 Feb 2003 17:02:48 +1300" Date: Wed, 05 Feb 2003 23:22:57 -0500 Message-ID: <9133.1044505377@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/105 X-Sequence-Number: 11503 Rodger Donaldson writes: > values (to_date('06/Feb/2003:11:29:11 +13', 'DD/Mon/YYYY:HH24:MI:SS'),0,302, > Always inserts the correct date, but sets the time to midnight. Um, well, yeah ... it's to_DATE, meaning it produces a result of type date. I think you wanted to_timestamp(). regards, tom lane