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!

How to convert a week-year string into a date

696834Jan 26 2010 — edited Jan 26 2010
Hi
How do I turn a string with a iw-yyyy (week-year) representation into a date type?

Example:

DECLARE
d varchar(200);
da date;

BEGIN

d := TO_CHAR(sysdate, 'iw-yyyy');
DBMS_OUTPUT.PUT_LINE(d);

-- THIS FAILS
da := to_date(d, 'IW-YYYY');

END;


Regards
Runski
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 23 2010
Added on Jan 26 2010
9 comments
6,047 views