TRUNC function removes time portion; here's an example:SQL> select to_date('2008-01-16 3:40:53 PM', 'yyyy-mm-dd hh:mi:ss PM') r
2 from dual;
R
-------------------
16.01.2008 15:40:53
SQL> select trunc(to_date('2008-01-16 3:40:53 PM', 'yyyy-mm-dd hh:mi:ss PM')) r
2 from dual;
R
-------------------
16.01.2008 00:00:00
SQL>
If table values also contain time, you might need to use TRUNC with 'e.startdate' column as well.
Also, note that you've used a wrong format mask: 'MM' is used for 'months'; 'MI' is used for minutes:SQL> select to_date('2008-01-16 3:40:53 PM', 'YYYY-MM-DD HH:MM:SS') r
2 from dual;
select to_date('2008-01-16 3:40:53 PM', 'YYYY-MM-DD HH:MM:SS') r
*
ERROR at line 1:
ORA-01810: format code appears twice
Furthermore, if you insist on PM notation, you'll have to include it into the TO_DATE function (as in my previous example):SQL> select to_date('2008-01-16 3:40:53 PM', 'YYYY-MM-DD HH:Mi:SS') r
2 from dual;
select to_date('2008-01-16 3:40:53 PM', 'YYYY-MM-DD HH:Mi:SS') r
*
ERROR at line 1:
ORA-01830: date format picture ends before converting entire input string
Finally, this is how your query might look like:SELECT e.*
FROM tabEmployees e
WHERE e.startdate >= TRUNC(TO_DATE('2008-01-16 3:40:53 PM', 'YYYY-MM-DD HH:MI:SS PM'));