X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 5C712474E53 for ; Mon, 17 Feb 2003 16:46:28 -0500 (EST) Received: from tomts24-srv.bellnexxia.net (tomts24.bellnexxia.net [209.226.175.187]) by postgresql.org (Postfix) with ESMTP id 66789474E42 for ; Mon, 17 Feb 2003 16:46:27 -0500 (EST) Received: from acer.sympatico.ca ([65.95.20.204]) by tomts24-srv.bellnexxia.net (InterMail vM.5.01.04.19 201-253-122-122-119-20020516) with ESMTP id <20030217214628.SHXN5735.tomts24-srv.bellnexxia.net@acer.sympatico.ca> for ; Mon, 17 Feb 2003 16:46:28 -0500 Message-Id: <5.1.1.6.0.20030217164006.03b8dec0@pop6.sympatico.ca> X-Sender: b1wudu74@pop6.sympatico.ca X-Mailer: QUALCOMM Windows Eudora Version 5.1.1 Date: Mon, 17 Feb 2003 16:43:01 -0500 To: pgsql-sql@postgresql.org From: Frank Bax Subject: Re: convert from an integer to a date In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/389 X-Sequence-Number: 11787 At 04:33 PM 2/14/03, STashlitsky@JEFCO.com wrote: >When I run select to_date('20030212','YYYYMMDD') the output is 2/12/03 >if I run select to_date( to_char(20030212,99999999),'YYYYMMDD'); the >output is 6/23/05 > >How can I convert from integer into date format correctly? Same as the first one, except leave out the quotes. select to_date(20030212,'YYYYMMDD');