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!

Help on displaying a report with week eg: Mar 22-28

Status
Not open for further replies.

funloving

Programmer
Apr 3, 2009
12
CA
I have created a query where I have to group records on the basis of week and some other fields.

My problem is when i group it on the basis of week using Datepart(wk) functionality it returns the number 13 for example for the last week of March and the same number appears in the report as its based on this query.

What i want is to display the week as Mar 22- 28 as thats the 13th week..is there any way of doing this .

Thanks in advance.

 
Hi.

Maybe something like this:

Week: Format([transactiondate]-Weekday([transactiondate])+1,"mmm dd") & " - " & Format([transactiondate]-Weekday([transactiondate])+7,"mmm dd")

The problem here though is that sorting won't work well on this field, because it will be alpha.

Hope it helps.

Thank you,
ChaZ

There Are 10 Types Of People In The world:
Those That Understand BINARY And Those That Don’t.

 
Thanks a ton...will let you know if it worked...
 
it works .....this has been very useful Chaz. Appreciate it..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top