Given Any Date , How to Deduce the Date for the Last Fri. of the SAME Month
?
how about
next_day(last_day(date) - 7, 'Friday')
where date is the given date?
for example to find the last Friday of the month
select next_day(last_day(sysdate) - 7, 'Friday')
from dual
Didn't we just do this one?
select next_day(last_day(sysdate) - 7, 'fri') from dual;
VIVEK_SHARMA wrote:
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: VIVEK_SHARMA
INET: [EMAIL
here it is..
SELECT NEXT_DAY(SYSDATE+(LAST_DAY(SYSDATE)-SYSDATE-7),'FRIDAY') FROM DUAL;
saurabh
- Original Message -
To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED]
Sent: Thursday, February 22, 2001 3:10 AM
Given Any Date , How to Deduce the Date for the Last Fri
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: VIVEK_SHARMA
INET: [EMAIL PROTECTED]
Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: VIVEK_SHARMA
INET: [EMAIL PROTECTED]
Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists
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: VIVEK_SHARMA
INET: [EMAIL PROTECTED]
Fat City Network Services-- (858) 538-5051 FAX: (858) 538-5051
San Diego, California