Weekly date criteria

G

Guest

I have a report that shows weekly information. I would like my week to be
from Saturday to Friday, the default seems to be Sunday To Saturday; does
anyone know how to change this? Thanks
 
M

Marshall Barton

Arlene said:
I have a report that shows weekly information. I would like my week to be
from Saturday to Friday, the default seems to be Sunday To Saturday; does
anyone know how to change this? Thanks


Whatever function you are using to get a week number from a
date field can use an additional argument for the first day
of week. E.g. DatePart("ww", datefield, 7)
 
G

Guest

Doesn't change my results for some reason. Here is what I did
=Format$([Dated],"ww",[dated],5) No matter what I change the number to it
doesn't end on another day. Which is what I want, right now all the weeks
end on Saturday and I want them to end on Sunday. Is it possible?
 
M

Marshall Barton

I think you misread Help for the Format function.

=Format$([Dated],"ww", 5)
--
Marsh
MVP [MS Access]

Doesn't change my results for some reason. Here is what I did
=Format$([Dated],"ww",[dated],5) No matter what I change the number to it
doesn't end on another day. Which is what I want, right now all the weeks
end on Saturday and I want them to end on Sunday. Is it possible?


Marshall Barton said:
Whatever function you are using to get a week number from a
date field can use an additional argument for the first day
of week. E.g. DatePart("ww", datefield, 7)
 
G

Guest

I did it this way and still get Saturday as the end of the week. Sorry to be
such a pain but I cannot see what is happening and frustration sets in
quickly. I have changed to other days and the same thing happens.


Marshall Barton said:
I think you misread Help for the Format function.

=Format$([Dated],"ww", 5)
--
Marsh
MVP [MS Access]

Doesn't change my results for some reason. Here is what I did
=Format$([Dated],"ww",[dated],5) No matter what I change the number to it
doesn't end on another day. Which is what I want, right now all the weeks
end on Saturday and I want them to end on Sunday. Is it possible?


Marshall Barton said:
Arlene wrote:

I have a report that shows weekly information. I would like my week to be
from Saturday to Friday, the default seems to be Sunday To Saturday; does
anyone know how to change this?


Whatever function you are using to get a week number from a
date field can use an additional argument for the first day
of week. E.g. DatePart("ww", datefield, 7)
 
G

Guest

Hi Marshall; I have now made it work; my problem was I was using the report
to group by week and it was still showing the dates ending Saturday. I went
to my underlying query and configured, my problem now is it shows by week
number not ending date, I will have to see if I can fix this. A whole nother
problem. But thanks again.

Marshall Barton said:
I think you misread Help for the Format function.

=Format$([Dated],"ww", 5)
--
Marsh
MVP [MS Access]

Doesn't change my results for some reason. Here is what I did
=Format$([Dated],"ww",[dated],5) No matter what I change the number to it
doesn't end on another day. Which is what I want, right now all the weeks
end on Saturday and I want them to end on Sunday. Is it possible?


Marshall Barton said:
Arlene wrote:

I have a report that shows weekly information. I would like my week to be
from Saturday to Friday, the default seems to be Sunday To Saturday; does
anyone know how to change this?


Whatever function you are using to get a week number from a
date field can use an additional argument for the first day
of week. E.g. DatePart("ww", datefield, 7)
 
M

Marshall Barton

Arlene said:
Hi Marshall; I have now made it work; my problem was I was using the report
to group by week and it was still showing the dates ending Saturday. I went
to my underlying query and configured, my problem now is it shows by week
number not ending date, I will have to see if I can fix this.


That's good, especially considering my typo. The 5 should
have been a 7.

You can display the saturday of any date by using a text box
expression like:

=datefield + 7 - DatePart("w", datefield)
 
M

Marshall Barton

Arlene said:
Thanks its amazing what "you" can do when you can talk the language.


Language is the essence of communication,
even with computers ;-)
 
G

Guest

I have a similar situation. I'm trying to run a report by month and group it
by week with the weeks running from Thurs to Wed. I tried to use the
formatting suggested below

=Format$([Dated],"ww", 5)

and it didn't change anything. In my query I have it set up to prompt for
date selection and then the report is grouped by week. Is there something
else I need to do to make it group with a different first day of the week.

I was using data from March and March 1 was a Thursday. I want the first
group to go from Thurs., March 1 to Wed., March 7. Right now it goes to
Thursday to Saturday and then starts the next group with Sunday.



--
jclem


Arlene said:
Hi Marshall; I have now made it work; my problem was I was using the report
to group by week and it was still showing the dates ending Saturday. I went
to my underlying query and configured, my problem now is it shows by week
number not ending date, I will have to see if I can fix this. A whole nother
problem. But thanks again.

Marshall Barton said:
I think you misread Help for the Format function.

=Format$([Dated],"ww", 5)
--
Marsh
MVP [MS Access]

Doesn't change my results for some reason. Here is what I did
=Format$([Dated],"ww",[dated],5) No matter what I change the number to it
doesn't end on another day. Which is what I want, right now all the weeks
end on Saturday and I want them to end on Sunday. Is it possible?


:

Arlene wrote:

I have a report that shows weekly information. I would like my week to be
from Saturday to Friday, the default seems to be Sunday To Saturday; does
anyone know how to change this?


Whatever function you are using to get a week number from a
date field can use an additional argument for the first day
of week. E.g. DatePart("ww", datefield, 7)
 

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