Re: to_date() confusion

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Richard Rowell <richard(at)bowmansystems(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: to_date() confusion
Date: 2003-01-08 15:06:03
Message-ID: 20030108150603.GB27870@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Wed, Jan 08, 2003 at 08:49:00 -0600,
Richard Rowell <richard(at)bowmansystems(dot)com> wrote:
> I'm confused. How do I massage the integer 10102 into the date
> 2002-01-01?
>
> cmi=> select to_char(10102,'000000');
> to_char
> ---------
> 010102
> (1 row)

Note the leading space in the returned row. That is probably what is making
the difference. You probably want to use to_char(10102,'FM000000').

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Rajesh Kumar Mallah. 2003-01-08 15:37:00 Re: Search and Replace
Previous Message Bruno Wolff III 2003-01-08 14:56:23 Re: Search and Replace