'how to find hourly time difference all record from sql table in oracle 11g?
I want to select all entries from the table named carpooling where time difference between ends_on and start_on is 1 hour can someone help me in writing query with explanation? i have attached images in links below.
Solution 1:[1]
Try this, converts timestamp to date and substracts on day basis
select *
from carpooling
where trunc(cast(ends_on as date),'mi')-trunc(cast(start_on as date),'mi')=1/24
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 |