oracle winter time change

Solutions on MaxInterview for oracle winter time change by the best coders in the world

showing results for - "oracle winter time change"
Ian
06 Feb 2019
1ALTER SESSION SET NLS_LANGUAGE=english; -- First day of week
2SELECT 
3	NEXT_DAY(LAST_DAY(TO_DATE(TO_CHAR('01/10/' -- Last Sunday of October 02:00
4        || (EXTRACT(YEAR FROM SYSDATE)-5 + level) || '02:00:00'), 
5           'DD/MM/YYYY HH24:MI:SS')) - INTERVAL '7' DAY, 'SUNDAY') AS H_WINTER,
6	NEXT_DAY(LAST_DAY(TO_DATE(TO_CHAR('01/03/' -- Last Sunday of March 02:00 
7		|| (EXTRACT(YEAR FROM SYSDATE)-5 + level) || '02:00:00'),
8		'DD/MM/YYYY HH24:MI:SS')) - INTERVAL '7' DAY, 'SUNDAY') AS H_SUMMER
9FROM DUAL CONNECT BY level <=10;
10-- ⇓ Test it ⇓ (Fiddle source link)