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 biv343 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 by week number

Status
Not open for further replies.

sk8er1

Programmer
Jan 2, 2005
229
US
I need to create a report that groups on week number.
How can i do that in crystal.

Thanks
 
My original report (in access) is calculating the week number this way...how can it be done in crystal?


WeekNo: DatePart("ww",[Schedule Date])+1-DatePart("ww",[Schedule Date]-Day([Schedule Date])+1)
 
Create a formula

datepart("ww", DateField)

and group on that
 
Just tested the code below and it worked fine. Make sure in Crystal to use { } instead of [ ] as well

DatePart("ww",{Schedule Date})+1-DatePart("ww",{Schedule Date}-Day({Schedule Date})+1)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top