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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to group data into weeks

Status
Not open for further replies.

vatawna

Programmer
Feb 24, 2004
67
US
I'd like to group data into week1, week2, week3, and week4 for each month. For example, if the report was processed on 2/5/07, the data should be in week1. If it was processed on 2/12/07, it should be in week2.

Does anyone know what formula or function would help me do this?

Thanks.
 
Select the date you require the group on, create group and then you get an option in the group dialogue box to group by day, week, month etc.

 
Create a formula {@weekno} like this:

datepart("ww",{table.date})-
datepart("ww",{table.date}-day({table.date})+1) + 1

Then insert a group on this formula.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top