Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Last Fri. of the Month ?
I think it should work:
select decode(to_char(last_day(sysdate),'DAY'),'FRIDAY',sysdate, next_day((last_day(sysdate)-7),'FRIDAY')) from dual
Replace sysdate with whatever date you want
Winnie
VIVEK_SHARMA <VIVEK_SHARMA_at_infy.com> on 02/21/2001 11:51:05 AM
To: "'oracledba_at_lazydba.com'" <oracledba_at_lazydba.com>,
"'ORACLE-L_at_fatcity.com'" <ORACLE-L_at_fatcity.com> cc:
Given Any Date , How to Deduce the Date for the Last Fri. of the SAME Month ?
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author:
INET: Winnie_Liu_at_infonet.com
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists --------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Thu Feb 22 2001 - 02:42:21 CST