X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 9A4F69DC83C for ; Mon, 13 Feb 2006 17:26:39 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 22972-07 for ; Mon, 13 Feb 2006 17:26:40 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from exchange.g2switchworks.com (mail.g2switchworks.com [63.87.162.25]) by postgresql.org (Postfix) with ESMTP id 364449DCC0E for ; Mon, 13 Feb 2006 17:26:36 -0400 (AST) Received: from 10.10.1.37 ([10.10.1.37]) by exchange.g2switchworks.com ([10.10.1.2]) with Microsoft Exchange Server HTTP-DAV ; Mon, 13 Feb 2006 21:26:38 +0000 Received: from state.g2switchworks.com by mail.g2switchworks.com; 13 Feb 2006 15:26:38 -0600 Subject: Re: to_date From: Scott Marlowe To: Jim Fu Cc: Michael Fuhr , pgsql-admin@postgresql.org In-Reply-To: <2BE5FA188E433143A09D9881BB923D32096F32@hou1x.Logixcom.com> References: <2BE5FA188E433143A09D9881BB923D32096F32@hou1x.Logixcom.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1139865997.22740.164.camel@state.g2switchworks.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Mon, 13 Feb 2006 15:26:38 -0600 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.168 required=5 tests=[AWL=0.167, UNPARSEABLE_RELAY=0.001] X-Spam-Score: 0.168 X-Spam-Level: X-Archive-Number: 200602/171 X-Sequence-Number: 20592 On Mon, 2006-02-13 at 15:22, Jim Fu wrote: > Thank you Michael for the info! > > I have the original date info as mmddyy, when I use copy tabname from filename, it fails due to mismatch between raw date info and date data type in the database. It seems like I had to convert the raw date info to be like 'yyyy-mm-dd' to match PostgreSQL date default format in order to use copy command. Take a look here: http://www.postgresql.org/docs/8.1/static/runtime-config-client.html#GUC-DATESTYLE and here: http://www.postgresql.org/docs/8.1/static/datatype-datetime.html