Search
 
SCRIPT & CODE EXAMPLE
 

SQL

oracle duration between timestamps

-- Duration between 2 timestamps
SELECT (extract(DAY FROM TIME2 - TIME1) * 24 * 60 * 60) 
           + (extract(HOUR FROM TIME2 - TIME1) * 60 * 60) 
           + (extract(MINUTE FROM TIME2 - TIME1) * 60) 
           + extract(SECOND FROM TIME2 - TIME1)
FROM DUAL;
Comment

PREVIOUS NEXT
Code Example
Sql :: How do I insert a blob in SQL? 
Sql :: T-SQL - Delete Column 
Sql :: postgresql random phone number 
Sql :: how to remove unique key in mysql 
Sql :: drop CHECK constraint sql 
Sql :: sql cnvert bit to nvarchar 
Sql :: how to find average in sql 
Sql :: sql find table by name 
Sql :: update foreign key value in mysql 
Sql :: change column data type sql 
Sql :: list table columns mysql 
Sql :: remove all data from table mysql 
Sql :: sql joins 
Sql :: date sql 
Sql :: odd record sql query 
Sql :: How to insert data in mysql ? 
Sql :: mysql how to use FIND_IN_SET function in WHERE clause ? 
Sql :: sql select where clause 
Sql :: download sql server for mac 
Sql :: run function in sql 
Sql :: add column in table 
Sql :: convert columns to rows in sql server 
Sql :: sql values to array of objects 
Sql :: postgres windows import dump 
Sql :: how to get all dates in a month in oracle 
Sql :: dbms_metadata.get_ddl table 
Sql :: sql query to create table in database 
Sql :: postgres delete by id 
Sql :: symfony Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails 
Sql :: how to start my sql server on mac 
ADD CONTENT
Topic
Content
Source link
Name
3+3 =