From: Karel Zak <zakkr@zf.jcu.cz>
To: Chris Pesko <cpesko@organic.com>
Cc: Stephan Szabo <sszabo@megazone23.bigpanda.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: help on to_date conversion please....
Date: Thu, 4 Apr 2002 10:36:43 +0200
Message-ID: <20020404103642.D20127@zf.jcu.cz> (raw)
In-Reply-To: <4.3.2.7.2.20020403160156.046526a0@mailhost.organic.com>
References: <4.3.2.7.2.20020403153945.00bb2030@mailhost.organic.com>
<20020403154655.Y98769-100000@megazone23.bigpanda.com>
<4.3.2.7.2.20020403160156.046526a0@mailhost.organic.com>
On Wed, Apr 03, 2002 at 04:02:11PM -0800, Chris Pesko wrote:
> Thanks. That seems a better way to go.
The PostgreSQL docs is your good friend :-)
> At 03:47 PM 4/3/02 -0800, Stephan Szabo wrote:
>
> >You might want to try the FM format on the to_char string...
> >sszabo=# select to_date(to_char(20020101, 'FM99999999'),'yyyymmdd');
> > to_date
> >------------
> > 2002-01-01
> >(1 row)
The extra space is very common for all to_...() outputs/inputs and is
needful thing of this. Don't ask me why.. it's Oracle idea.
Karel
--
Karel Zak <zakkr@zf.jcu.cz>
http://home.zf.jcu.cz/~zakkr/
C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz
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-admin@postgresql.org
Cc: zakkr@zf.jcu.cz, cpesko@organic.com, sszabo@megazone23.bigpanda.com
Subject: Re: help on to_date conversion please....
In-Reply-To: <20020404103642.D20127@zf.jcu.cz>
References: <4.3.2.7.2.20020403153945.00bb2030@mailhost.organic.com> <20020403154655.Y98769-100000@megazone23.bigpanda.com> <4.3.2.7.2.20020403160156.046526a0@mailhost.organic.com> <20020404103642.D20127@zf.jcu.cz>
* 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