select * from po_headers_all pha
where trunc(pha.creation_date) between '20-SEP-2016' and '20-SEP-2016';
select * from po_headers_all pha where trunc(pha.creation_date) = TO_DATE('20-sep-2016','dd-mon-yyyy');
Its very basic stuff friend.just try to give it a try
will this help ?
select * from po_headers_all
where trunc(creation_date) = trunc(sysdate - 1) ;
I just said with example as 20-Sep, but actually we are running it daily. So, I want with the help of SYSDATE function
Thanks and Regards,
Raghu's answer is the one you want then. It will always return the day before the current date.