How to return the week number starting from Sunday as the first day
365810Nov 2 2005 — edited Nov 3 2005Hi 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