Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id D68B8475902 for ; Mon, 3 Jun 2002 12:09:48 -0400 (EDT) Received: from tycho.webline.dk (unknown [62.79.38.39]) by postgresql.org (Postfix) with SMTP id 0901F475BC2 for ; Mon, 3 Jun 2002 12:04:45 -0400 (EDT) Received: (qmail 3346 invoked from network); 3 Jun 2002 16:04:26 -0000 Received: from unknown (HELO there) (192.168.1.25) by tycho with SMTP; 3 Jun 2002 16:04:26 -0000 Content-Type: text/plain; charset="iso-8859-1" From: Kaare Rasmussen To: "Paul " , pgsql-sql@postgresql.org Subject: Re: to_date() Date: Mon, 3 Jun 2002 18:04:56 +0200 X-Mailer: KMail [version 1.3.1] References: <20020603005347.29190.qmail@operamail.com> In-Reply-To: <20020603005347.29190.qmail@operamail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <20020603160445.0901F475BC2@postgresql.org> X-Archive-Number: 200206/15 X-Sequence-Number: 7980 > 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 If you only want the date: select to_date('2002-04-29 07:33:55.000','FXYYYY-MM-DD HH24:MI:SS.MS') as rebill_date; If you want the whole thing: select to_timestamp('2002-04-29 07:33:55.000','FXYYYY-MM-DD HH24:MI:SS.MS') as rebill_date; MM is month MI is minute -- Kaare Rasmussen --Linux, spil,-- Tlf: 3816 2582 Kaki Data tshirts, merchandize Fax: 3816 2501 Howitzvej 75 Åben 12.00-18.00 Web: www.suse.dk 2000 Frederiksberg Lørdag 11.00-17.00 Email: kar@kakidata.dk