Week of the month

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi

I have a report which lists staff hours for various dates. What could be a
way to assign to each entry the week of the month that the date for the
entry belongs to?

Thanks

Regards
 
Depends upon how you define the week of the month. How do you identify what
it is?
 
if date1 is date from the first entry whatever it is then
date1 - date1+6 = week 1
date1+7 - date1+13 = week 2

and so on..

Slightly tricky I can see, as date1 could be anything depending on the
report input query..

Regards
 
Assuming that you have access to date1 value in the query, a calculated
field similar to this might work (new date is the date that you want to know
in which week it is):

WeekNumberForReport: DateDiff("w",[date1],[NewDate]) + 1


--

Ken Snell
<MS ACCESS MVP>
 
U¿ytkownik "Ken Snell said:
Assuming that you have access to date1 value in the query, a calculated
field similar to this might work (new date is the date that you want to know
in which week it is):

WeekNumberForReport: DateDiff("w",[date1],[NewDate]) + 1


--

Ken Snell
<MS ACCESS MVP>


John said:
if date1 is date from the first entry whatever it is then
date1 - date1+6 = week 1
date1+7 - date1+13 = week 2

and so on..

Slightly tricky I can see, as date1 could be anything depending on the
report input query..

Regards
could
 

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

Back
Top