Yup, even better. For some reason I gave up trying to_date( '02', 'MON' ), which clearly wasn't working.

Thanks for the improvement!

-tfo

--
Thomas F. O'Connell
Co-Founder, Information Architect
Sitening, LLC
http://www.sitening.com/
110 30th Avenue North, Suite 6
Nashville, TN 37203-6320
615-260-0005

On Oct 19, 2004, at 6:00 PM, Edmund Bacon wrote:

Thomas F.O'Connell wrote:
There might be a better way, but this should do what you want. And I think that you can safely replace '05' with when_month.
select to_char( to_date( '05' || '/' || to_char( current_date, 'DD/YYYY' ), 'MM/DD/YYYY' ), 'MON' );

Perhaps select to_char(to_date('02', 'MM'), 'MON');

is better.  When current_date is, say Aug 31 then

select to_char( to_date('05' || '/' || to_char(current_date, 'DD/YYYY'),
'MM/DD/YYYY' ), 'MON' );


returns 'MAR', which is probably not what you want.

This works with 7.3.2, 7.4.5 and 8.0beta2.


---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to