system date in oracle code example
Example 1: date format in oracle
e.g., 01-JAN-17
Example 2: oracle date winter time
ALTER SESSION SET NLS_LANGUAGE=english;
SELECT
NEXT_DAY(LAST_DAY(TO_DATE(TO_CHAR('01/10/'
|| (EXTRACT(YEAR FROM SYSDATE)-5 + level) || '02:00:00'),
'DD/MM/YYYY HH24:MI:SS')) - INTERVAL '7' DAY, 'SUNDAY') AS H_WINTER,
NEXT_DAY(LAST_DAY(TO_DATE(TO_CHAR('01/03/'
|| (EXTRACT(YEAR FROM SYSDATE)-5 + level) || '02:00:00'),
'DD/MM/YYYY HH24:MI:SS')) - INTERVAL '7' DAY, 'SUNDAY') AS H_SUMMER
FROM DUAL CONNECT BY level <=10;