Oracle: How to select less or greater than with dates

Coming from a Microsoft/SQL Server world but now into Open Source/Oracle, I didn’t know what the syntax was, so here’s how:

select * from table where column < to_date(‘6/21/2014 21:50:0′,’mm/dd/yyyy HH24:MI:SS’);

select * from table where column > to_date(‘6/21/2014 21:50:0′,’mm/dd/yyyy HH24:MI:SS’);

Hope this helps someone out there.  Cheers!

Leave a Reply

Your email address will not be published. Required fields are marked *