Search
 
SCRIPT & CODE EXAMPLE
 

SQL

oracle winter time change

ALTER SESSION SET NLS_LANGUAGE=english; -- First day of week
SELECT 
	NEXT_DAY(LAST_DAY(TO_DATE(TO_CHAR('01/10/' -- Last Sunday of October 02:00
        || (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/' -- Last Sunday of March 02:00 
		|| (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;
-- ⇓ Test it ⇓ (Fiddle source link)
Comment

PREVIOUS NEXT
Code Example
Sql :: ORA-13717 
Sql :: create table using the clause with as 
Sql :: postgresql 
Sql :: sqlite headers 
Sql :: oracle create job if not exists 
Sql :: Update Multiple Values in a Row 
Sql :: SQL Remove Primary Key Constraint - SQL Server, Oracle 
Sql :: how to merge to coloumns into a single column with a space. 
Sql :: laravel How to find the password of mysql on desktop docker in laravel 
Sql :: jpa generationtype sequence mysql 
Sql :: sql find record cannot cast date 
Sql :: mysqli count down 
Sql :: Use Join On DataTables | Join Two Tables With ssp.class.php (Select & Search) 
Sql :: custom row number 
Sql :: sql filter rows with condition 
Sql :: oracle last user logon 
Sql :: codeigniter MySQL - Issue with SELECT & GROUP BY 
Sql :: sqlx many to many join 
Sql :: how to fetch first 10 rows in sql 
Sql :: how to find constraints on a table in oracle 
Sql :: in condition in sql 
Sql :: delete duplicate data from table 
Sql :: mask data in sql 
Sql :: select all domains of database firbird 
Csharp :: lockstate untiy 
Csharp :: c# read text file to list string 
Csharp :: c# async sleep 
Csharp :: how to stop window from terminating c# visual studio 
Csharp :: unity mouse click m 
Csharp :: c# get unix timespan 
ADD CONTENT
Topic
Content
Source link
Name
5+7 =