Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to search BETWEEN Dates

491474Jul 24 2007 — edited Jul 24 2007
I'm on 9i.

I have the following query which will not work. I need to search for data between the time range I have in the WHERE Clause below.
SELECT *
FROM SYS.AUD$
WHERE TIMESTAMP# BETWEEN '23-Jul-07 06:55:00 PM' AND '23-Jul-07 07:30:00 PM'
ORDER BY 4 DESC

The data in the TIMESTAMP# Column looks like this;
23-Jul-07 06:55:00 PM

The TIMESTAMP# Column is a DATE DataType.

How do I get my query to work? I thought that because it is a DATE DataType, I wouldn't need to perform any sort of conversion such as TO_DATE()
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 21 2007
Added on Jul 24 2007
10 comments
877 views