Skip to Main Content

SQL & PL/SQL

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!

TO_DATE - How do I pass the date and time to the function

312061Mar 8 2006 — edited Mar 8 2006
Hi,
I am writing a PL/SQL code. The code has a simple cursor,
For the criteria, I am using a column called 'created' which is a date column, and the to_date function.
I would like to pass the date and time to the to_date fuction as a parameter, date_value, as shown below.

CURSOR opty is
select a.name, a.id
from s_opty a
where a.created > to_date(date_value, 'DD/MM/YYYY HH24:MI:SS');

I've tried declaring a bind variable,
date_value date := '&1'
but no joy.

Any ideas would be welcomed.

Thanks in antcipation
Mukesh
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 5 2006
Added on Mar 8 2006
3 comments
1,099 views