X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 2E76C474E4F for ; Wed, 5 Feb 2003 23:02:57 -0500 (EST) Received: from israel.diaspora.gen.nz (israel.diaspora.gen.nz [202.50.109.65]) by postgresql.org (Postfix) with ESMTP id 836664758E1 for ; Wed, 5 Feb 2003 23:02:56 -0500 (EST) Received: from rodgerd by israel.diaspora.gen.nz with local (Exim 3.35 #1 (Debian)) id 18gdFR-00027H-00; Thu, 06 Feb 2003 17:02:49 +1300 Date: Thu, 6 Feb 2003 17:02:48 +1300 To: pgsql-sql@postgresql.org Subject: to_date has beaten me... Message-ID: <20030206040247.GA8032@diaspora.gen.nz> Reply-To: rodgerd@diaspora.gen.nz Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i From: Rodger Donaldson X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/104 X-Sequence-Number: 11502 Postgresql 7.2.3 insert into log_entries values (to_date('06/Feb/2003:11:29:11 +13', 'DD/Mon/YYYY:HH24:MI:SS'),0,302, [... various other data elided ...]); Always inserts the correct date, but sets the time to midnight. Thinking this might be solved by shuffling with the source data, I've tried such combinations as: to_date('06/Feb/2003:11:29:11', 'DD/Mon/YYYY:HH24:MI:SS') to_date('06/Feb/2003:11:29:11 +13', 'DD/Mon/YYYY:HH:MI:SS') to_date('06/02/2003:11:29:11', 'DD/MM/YYYY:HH24:MI:SS') ...and so forth, but despite the column in question being a timestamp with timszone, everything except the date gets truncated. -- Rodger Donaldson rodgerd@diaspora.gen.nz "My ATEX terminal isn't working" "Is there power to the keyboard?" "No, and it has smoke and flames coming out of it"