Re: help with to_date and to_char - Mailing list pgsql-sql

From Edmund Bacon
Subject Re: help with to_date and to_char
Date
Msg-id 41759DA4.6070803@onesystem.com
Whole thread Raw
In response to Re: help with to_date and to_char  (Edmund Bacon <ebacon@onesystem.com>)
Responses Which type of functions are best?
List 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@onesystem.com>


pgsql-sql by date:

Previous
From: lorid
Date:
Subject: Re: help with to_date and to_char
Next
From: Pierre-Frédéric Caillaud
Date:
Subject: Re: need query advice