convert from an integer to a date

From: STashlitsky(at)JEFCO(dot)com
To: pgsql-sql(at)postgresql(dot)org
Subject: convert from an integer to a date
Date: 2003-02-14 21:33:09
Message-ID: OFC94B0A45.89F8C8AE-ON85256CCD.0075A6DD@jc.jefco.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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?

Thanks for any help with this.

Svetlana

Jefferies archives and reviews outgoing and incoming e-mail. It may be produced at the request of regulators or in connection with civil litigation. Jefferies accepts no liability for any errors or omissions arising as a result of transmission. Use by other than intended recipients is prohibited.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2003-02-14 22:08:27 Re: sub-query optimization
Previous Message Robert Treat 2003-02-14 21:31:41 Re: postmaster -i & establishes three connections why?