Using Date in where clause
772087May 10 2010 — edited May 10 2010Hello all,
I am new to Oracle, currently using 10G + aspvbscript.
I've been trying to query data using date in where clause but nothing seems to work.
The column is in date format.
It gets printed out like this: 5/1/2010 11:21:19 AM
I tried using this query:
SELECT * from table where TRUNC(user_date) > to_date('FEB-01-2010:00:00:00','mm-dd-yyyy:HH24:MI:SS') order by user_date asc.
It does return an output but it returns everything in table and does not take WHERE clause into consideration however, it does sort the date in ascending order.
I've tried getting rid of TRUNC tried to format date in a different way but no such luck.
Please point me to the right direction.
Thanks.