i am fetching one record based on date but not able to fetch the data.
in my table pdate column is there with date datatype and value is in that is:15-OCT-12
so i am fetching empid based on dates.
select emp_id from masterprocessdailydata where pdate=to_date('15-Oct-2012 00:00:00','dd-mon-yyyy hh24:mi:ss');
but not getting the empid.
this i tried it's not working but i used this one:
select emp_id from masterprocessdailydata where trunc(pdate)='15/OCT/2012';
and it's working.
but i have one more question this pdate value i am storing in one variable which is also date type.
but when i checked this through break point it's storing value with time also.
i want that it should store only date not time.
how to do that?