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!

Grouping by Week Ending? 2

Status
Not open for further replies.

daguas

Technical User
Jul 8, 2004
24
0
0
US
in 8.5. I have setup a group on a date field that will be printed for each week. It displays the first day of that week in the Group header name, I need it to show the week ending date instead. Any ideas?
 
Go to report->change group expert->your group->customize groupname->use a formula to customize name->x+2 and enter:

totext(dateadd("d",6,{table.date}-dayofweek({table.date})+1),"MM/dd/yyyy")

-LB
 
Your the greatest lbass. thanks much.
 
to let the count of the week start at monday (counted from the first of january of the year) in stead of sunday add the following behind the formula:

,crfirstjan1,crmonday

so the formula would look like:

totext(dateadd("d",6,{table.date}-dayofweek({table.date})+1),"MM/dd/yyyy", crfirstjan1, crmonday)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top