Reputation: 77
How find a data for the period?
sysdate - 15 minutes
sysdate
Example:
the current date and time: 24.01.2017 12:15:00
start date: 24.01.2017 12:00:00
end date: 24.01.2017 12:15:00
Is there any way to do?
Upvotes: 0
Views: 36
Reputation: 167972
SELECT *
FROM your_table
WHERE date_column BETWEEN SYSDATE - INTERVAL '15' MINUTE AND SYSDATE;
Upvotes: 1
Reputation: 50017
You'd do something like
SELECT *
FROM SOME_TABLE
WHERE DATE_FIELD BETWEEN TO_DATE('24.01.2017 12:15:00', 'DD.MM.YYYY HH24:MI:SS')
AND TO_DATE('24.01.2017 12:00:00', 'DD.MM.YYYY HH24:MI:SS')
However, the above will return nothing because your end date is earlier than your start date. If you change your start and end dates around, however, and fix up the table and field names, you should be good.
Best of luck.
Upvotes: 1