Skip to Main Content

Analytics Software

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 return the week number starting from Sunday as the first day

365810Nov 2 2005 — edited Nov 3 2005
Hi Friends,

My application needs to have a report for the weekly totals and must have the Sunday as the first day for the week. For example, January of 2005 should be in the report for having six weeks, Jan 1 is Saturday, this is week 1, Week 2 is from 2 to 8, and the last week , week 6 has 30 and 31. Days need not be displayed, only the week number as follows:

Week Number Total Sales
=========== =========
Week 1 8,525
Week 2 8,168
Week 3
Week 4
Week 5
Week 6
--- ---
The discoverer hierarchies function for week (eul_date_trunc(item_date, '"W"W')) seems to start the week from the first day of the month regardless of the day. Oracle function TO_CHAR(item_date, 'W') does the same thing, .As the result, the January of 2005 has only 5 weeks.
Any help or advice for this issue will be greatly appreciated.

Thank you very much,

J.K
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 1 2005
Added on Nov 2 2005
2 comments
2,137 views