Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Function for Week that pulls week number

Status
Not open for further replies.

shricky

Programmer
Mar 6, 2007
17
US
I am looking for a function that will pull the week of the year outside of any date in the table. I want to group from the week and then my order_date will fall into the correct week buckets. Does that make sense?
 
Thanks for the quick reply. Yes, that would work if I used my order_date, but I am trying to compare 2007 $ to 2006 $ and when I group it by the week function that pulls from the order date and it will not bring comparative results because of the year in the order date. So I want the week function to work independent of any date field. Is there such a thing?
 
and it will not bring comparative results because of the year in the order date."

So link by the week.

-k
 
Actually that is very interesting. How do I link by the week?
 
If you insert a group on:

datepart("ww",{table.date})

...you can then add conditional formulas like this:

if Year({table.date}) = 2007 then {table.amt}

Repeat for 2006. Add these to the detail section, and then insert summaries on them at the weekgroup level, and then suppress the detail section.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top