In Oracle, to extract only the date from a datetime field, use the code below:
select * from table_name where trunc(field_name) < = '2013-08-01';
Suppose your field UPDATE_DTTM has datetime stamp of a transaction – say ‘2013-08-01 02:30:31’
select * from table_name where UPDATE_DTTM < = '2013-08-01';
would not return any rows. Because, by default in Oracle, ‘2013-08-01’ represents ‘2013-08-01 00:00:00’
select * from table_name where trunc(UPDATE_DTTM) < = '2013-08-01';
would return a row, since only the date is being compared.
Have fun 🙂