Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problem while getting data based on date

677632Jan 9 2009 — edited Jan 9 2009
Hi,

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.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 6 2009
Added on Jan 9 2009
3 comments
250 views