Group Week Sunday to Saturday

C

CJ

Hi Groupies:

I have a report that lists employee pay. The report is currently grouped by
week and then by employee.

Everything works fine, except that I would like the Date Header label to be:
"For Week Ending - ....." with the last date of the week showing up after
the hyphen. So like this:

For Week Ending - April 12, 2008
For Week Ending - April 19, 2008

At the moment my report is grouped by the dtmDate field and the interval is
set at Week. Sunday is the first day, Saturday is the last.
I have ="For Week Ending - " & Format$([dtmDate],"mmmm dd, yyyy",0,0) in
the label for the date header

I believe that I need to replace dtmDate with an expression in the Grouping
box but what should the expression be?
 
E

Evi

=DateValue(Int(NZ([DateField])))+1-DatePart("w",DateValue(Int(NZ([Datefield]
))))

gets you the weekstart date of a date range so you could add 6 to get the
weekend date.
you'll be able to do this more simply now you've got the idea but I'm
half-asleep at the mo.
Evi
 
C

CJ

Wow, you can put that together when you're half asleep!!!

Thanks a bunch, it worked perfectly after I added +6 to the end!

---
CJ
---------------------------------------------------------
Know thyself, know thy limits....know thy newsgroups!


Evi said:
=DateValue(Int(NZ([DateField])))+1-DatePart("w",DateValue(Int(NZ([Datefield]
))))

gets you the weekstart date of a date range so you could add 6 to get the
weekend date.
you'll be able to do this more simply now you've got the idea but I'm
half-asleep at the mo.
Evi
CJ said:
Hi Groupies:

I have a report that lists employee pay. The report is currently grouped by
week and then by employee.

Everything works fine, except that I would like the Date Header label to be:
"For Week Ending - ....." with the last date of the week showing up after
the hyphen. So like this:

For Week Ending - April 12, 2008
For Week Ending - April 19, 2008

At the moment my report is grouped by the dtmDate field and the interval is
set at Week. Sunday is the first day, Saturday is the last.
I have ="For Week Ending - " & Format$([dtmDate],"mmmm dd, yyyy",0,0) in
the label for the date header

I believe that I need to replace dtmDate with an expression in the Grouping
box but what should the expression be?
 
C

CJ

Oh what a riot!

Although I am very familiar and was a big fan of Journey.....No, I have
never been to a Journey band forum.

Ciao,

CJ
 
J

jlute

Oh what a riot!

Although I am very familiar and was a big fan of Journey.....No, I have
never been to a Journey band forum.

Ciao,

CJ






- Show quoted text -

WAS a fan of JOURNEY!? WAS!?

There is no WAS! Once a JOURNEY fan ALWAYS a JOURNEY fan!

Their new album REVELATION is due out June 3rd exclusively at
Wal*Mart. They've got a new lead singer named Arnel Pineda and he's
sure to help put them back on the map.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top