Re: help with to_date and to_char

From: Edmund Bacon <ebacon(at)onesystem(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: help with to_date and to_char
Date: 2004-10-19 23:05:08
Message-ID: 41759DA4.6070803@onesystem.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Edmund Bacon wrote:
> When current_date is, say Aug 31 then
>
> select to_char( to_date('05' || '/' || to_char(current_date, 'DD/YYYY'),
> 'MM/DD/YYYY' ), 'MON' );
>

NUTS! that should have been
select ... to_date('02' || ...

{ cut, paste, ?edit? }

> returns 'MAR', which is probably not what you want.
>
> This works with 7.3.2, 7.4.5 and 8.0beta2.
>
--
Edmund Bacon <ebacon(at)onesystem(dot)com>

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message lorid 2004-10-19 23:08:24 Re: help with to_date and to_char
Previous Message Edmund Bacon 2004-10-19 23:00:08 Re: help with to_date and to_char