From: Frank Bax <fbax@sympatico.ca>
To: pgsql-sql@postgresql.org
Subject: Re: convert from an integer to a date
Date: Mon, 17 Feb 2003 16:43:01 -0500
Message-ID: <5.1.1.6.0.20030217164006.03b8dec0@pop6.sympatico.ca> (raw)
In-Reply-To: <OFC94B0A45.89F8C8AE-ON85256CCD.0075A6DD@jc.jefco.com>
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');
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: fbax@sympatico.ca
Subject: Re: convert from an integer to a date
In-Reply-To: <5.1.1.6.0.20030217164006.03b8dec0@pop6.sympatico.ca>
References: <OFC94B0A45.89F8C8AE-ON85256CCD.0075A6DD@jc.jefco.com> <5.1.1.6.0.20030217164006.03b8dec0@pop6.sympatico.ca>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox