Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 43E1E475DC6 for ; Sun, 2 Jun 2002 20:54:41 -0400 (EDT) Received: from ws4-1.us4.outblaze.com (205-158-62-42.outblaze.com [205.158.62.42]) by postgresql.org (Postfix) with SMTP id 8B522475B47 for ; Sun, 2 Jun 2002 20:53:43 -0400 (EDT) Received: (qmail 29191 invoked by uid 1001); 3 Jun 2002 00:53:47 -0000 Message-ID: <20020603005347.29190.qmail@operamail.com> Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-Mailer: MIME-tools 5.41 (Entity 5.404) Received: from [203.5.51.166] by ws4-1.us4.outblaze.com with http for paul@operamail.com; Mon, 03 Jun 2002 10:53:47 +1000 From: "Paul " To: pgsql-sql@postgresql.org Date: Mon, 03 Jun 2002 10:53:47 +1000 Subject: to_date() X-Originating-Ip: 203.5.51.166 X-Originating-Server: ws4-1.us4.outblaze.com X-Archive-Number: 200206/9 X-Sequence-Number: 7974 Can someone explain to me why this happens? ====== select to_date('2002-04-29 07:33:55.000','FXYYYY-MM-DD HH24:MM:SS.MS') as rebill_date; rebill_date ------------- 2004-09-30 ====== Ultimatly I'm doing a select into where the original field is of type "character varying". Doing ====== select fieldname::date as rebill_date ====== generates a "ERROR: Cannot cast type 'character varying' to 'date'" error, but doing ====== select fieldname::text::date as rebill_date ====== seemes I think I've achieved what I want, but would still be interested in learning about to_date(). Thanks, Paul -- _______________________________________________ Download the free Opera browser at http://www.opera.com/ Powered by Outblaze