How can I create group by week numbers in a schedule?

k1ss0ff
k1ss0ff used Ask the Experts™
on
I am trying to create a report of a base roster so that a person might be able to print out all the work they have to do over the cycle.  I've managed to report according to date, and group weekly by date.  However I am trying to input a count of week numbers

Week 1
                        Sunday 14/01/2008 <0>
                        Monday 15/01/2008  E
                        Tuesday 16/01/2008 E
                        <...>
Week 2
                        Sunday 21/01/2008 <0>
                        Monday 22/01/2008  E
                        Tuesday 23/01/2008 E
                        <...>
etc.

The dates exist in the database, but the week numbers do not, so I need some way of calculating them I think!

Many thanks in advance
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
I don't think I understand how you are defining week 1.

Author

Commented:
Sorry, there is a template start date week 1 starts on the Sunday which is the template start date...
How does the report know what date week 1 starts on?
Is it hard coded into a variable or is it on the input data or what?
OWASP: Forgery and Phishing

Learn the techniques to avoid forgery and phishing attacks and the types of attacks an application or network may face.

Mike McCrackenSenior Consultant
Most Valuable Expert 2011
Top Expert 2013

Commented:
If the first is the first group in the report, you can use the special field GroupNumber to get the week number.

mlmcc
Commented:
I managed to work it out using a formula -

int(({CURRENT_DATE_FIELD}-{TEMPLATE.STARTDATE})/7)+1
Mike McCrackenSenior Consultant
Most Valuable Expert 2011
Top Expert 2013

Commented:
Recommend this be closed with no points to experts.  The comment from mlmcc has nothing to do with the final answer

mlmcc
Mike McCrackenSenior Consultant
Most Valuable Expert 2011
Top Expert 2013

Commented:
This should be PAQ/Refund.  The suggested comment has nothing to do with the answer

mlmcc

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial