Requirement:
Fetch Monday to Friday dates based on current date or inputted date.
Solution
select to_char(dow,'DAY')||' '||to_char(dow,'DD-MON-YYYY') display_date,dow date_returned
from
(select next_day(to_char(sysdate,'DD-MON-YYYY'),'MONDAY')+ (rownum-1) - 7 DOW
from dual
connect by level <= 5);
Replace "sysdate" with any date paremeter.
Acknowledgement
Displaying week days for current week - Ask TOM (oracle.com)
Comments
Post a Comment