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!

Week Number issue

IniyavanAug 18 2010 — edited Aug 23 2010
Hi friends,

I have two questions.

Q#1. If I use

SELECT to_char('01-FEB-2010','WW') FROM dual;

I get '05'. Now I have '201005' as input. I need to get '01-FEB-2010' (or the starting date of the week) as output.

Q#2. If I use

SELECT to_char('10-JAN-2010','WW') ww, to_char('10-JAN-2010','IW') iw FROM dual;

I get '02' and '01'. But I need to get '03'. ie., The week number should start from Sunday, not from 1st day of the year (Oracle format) or ISO format.

Thanks in advance.

Edited by: Iniyavan on Aug 18, 2010 12:35 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 20 2010
Added on Aug 18 2010
13 comments
1,337 views