|
|
|
|
Re: last day of first week in a month [message #287631 is a reply to message #287501] |
Thu, 13 December 2007 00:25 |
|
Are you looking for this?
SQL> SELECT NEXT_DAY (TO_DATE ('01092007', 'ddmmyyyy') - 1, 'SAT')||' - '||
2 TO_CHAR (NEXT_DAY (TO_DATE ('01092007', 'ddmmyyyy') - 1, 'SAT'), 'DAY') SEPTEMBER,
3 NEXT_DAY (TO_DATE ('01102007', 'ddmmyyyy') - 1, 'SAT')||' - '||
4 TO_CHAR (NEXT_DAY (TO_DATE ('01102007', 'ddmmyyyy') - 1, 'SAT'), 'DAY') OCTOBER,
5 NEXT_DAY (TO_DATE ('01112007', 'ddmmyyyy') - 1, 'SAT')||' - '||
6 TO_CHAR (NEXT_DAY (TO_DATE ('01112007', 'ddmmyyyy') - 1, 'SAT'), 'DAY') NOVEMBER,
7 NEXT_DAY (TO_DATE ('01122007', 'ddmmyyyy') - 1, 'SAT')||' - '||
8 TO_CHAR (NEXT_DAY (TO_DATE ('01122007', 'ddmmyyyy') - 1, 'SAT'), 'DAY') DECEMBER
9 FROM DUAL;
SEPTEMBER OCTOBER NOVEMBER DECEMBER
--------------------- --------------------- --------------------- ---------------------
01-SEP-07 - SATURDAY 06-OCT-07 - SATURDAY 03-NOV-07 - SATURDAY 01-DEC-07 - SATURDAY
Kiran.
|
|
|
|
|