Problem while getting data based on date
677632Jan 9 2009 — edited Jan 9 2009Hi,
Iam new to oracle. Iam trying to get data from table for a particular period.
select column1, column2, column3 from siebel.table1 where last_upd between '$from_date' AND '$to_date');
from_date and to_date are in TIMESTAMP and last_upd is of date format. When I run the above query it is throwing an error “ORA-01830: date format picture ends before converting entire input string". Please let me know how to come out of this problem. I have tried *select column1, column2, column3 from siebel.table1 where substr( TO_TIMESTAMP(TO_CHAR(LAST_UPD),'DD-MON-RRHH24:MI:SS.FF6'),1,25) between '$from_date' AND '$to_date');*
But it is fetching zero records at this stage. Please suggest me on this.