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

CROSS TABS for each week grouping

Status
Not open for further replies.

coffee123

Programmer
Joined
Jul 24, 2002
Messages
6
Location
GB
Greetings people

Problem. I have created a crosstab report. I am grouping cross tabs on date field with the "each week" group option. BUT here come the problem the date the crosstab defaults to the nearest sunday. Not good.

I want it to be a first monday. ie Sunday + 1 day. in a formula or something

is this possible?

thanks
 
Create the following formula:
----------------------------------------
DatePart ("ww",{your_date_time_column} , crMonday)
----------------------------------------
It returns the week number where weeks start on Monday.

If your column is Date Type (rather than DateTime),
use the following formula:
----------------------------------------
DatePart ("ww",CDateTime({your_date_column}) , crMonday)
----------------------------------------

Then, use this formula as your CrossTab grouping.

Cheers,
- Ido CUT & Visual CUT: e-mailing, exporting, bursting, distribution, and scheduling of Crystal Reports:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top