Archives: 02/26/2013

LIST OF DAYS IN THE MONTH

SELECT to_char(dt_giorno, ‘DAY’) ds_giorno, dt_giorno FROM (SELECT TO_DATE(TO_CHAR(LEVEL, ’09’) || TO_CHAR(EXTRACT(MONTH FROM to_date(‘201301′ || ’01’, ‘YYYYMMDD’)), ’09’) || TO_CHAR(EXTRACT(YEAR FROM to_date(‘201301′ || ’01’, ‘YYYYMMDD’)), ‘9999’), ‘DDMMYYYY’) dt_giorno FROM dual WHERE ROWNUM <= EXTRACT(DAY FROM LAST_DAY(to_date(‘201301′ || ’01’, ‘YYYYMMDD’))) CONNECT BY LEVEL = ROWNUM) ORDER BY dt_giorno

Go Top