Week number from MeetingDate

  • Thread starter Thread starter JeffMKlein
  • Start date Start date
J

JeffMKlein

I have a query that returns MeetingDates. I am trying to create a column
that shows the week number of the month. (1-5) for these dates. Any ideas??
 
Can you define week number of the month? For instance what values would you
expect for:

May 31, 2005
June 1, 2005
Sept 4, 2005
Oct 2, 2005

What are the rules you apply to get these values?
 
Duane, Thanks for the reply. To answer your question I am looking for the
week sequence number for a given date. Example: 7-1-05 will show 1, 7-6-06
shows 2, 7-10-05 shows 3 etc.
I think I have figured out the solution.
WeekNumber:
(([meetingdate]-(([meetingdate]-Day([meetingdate]-1))-Weekday([meetingdate]-
Day([meetingdate]))))\7)+1
Tell me what you think
 
I would use
DateDiff("ww",meetingdate-(Day(meetingdate)-1),meetingdate)+1

--
Duane Hookom
MS Access MVP
--

JeffMKlein said:
Duane, Thanks for the reply. To answer your question I am looking for the
week sequence number for a given date. Example: 7-1-05 will show 1,
7-6-06
shows 2, 7-10-05 shows 3 etc.
I think I have figured out the solution.
WeekNumber:
(([meetingdate]-(([meetingdate]-Day([meetingdate]-1))-Weekday([meetingdate]-
Day([meetingdate]))))\7)+1
Tell me what you think


Duane Hookom said:
Can you define week number of the month? For instance what values would you
expect for:

May 31, 2005
June 1, 2005
Sept 4, 2005
Oct 2, 2005

What are the rules you apply to get these values?
 
Duane, Thanks for the help. I never thought of using DateDiff. This is more
straight forward approach.
Thanks again, Jeff

Duane Hookom said:
I would use
DateDiff("ww",meetingdate-(Day(meetingdate)-1),meetingdate)+1

--
Duane Hookom
MS Access MVP
--

JeffMKlein said:
Duane, Thanks for the reply. To answer your question I am looking for the
week sequence number for a given date. Example: 7-1-05 will show 1,
7-6-06
shows 2, 7-10-05 shows 3 etc.
I think I have figured out the solution.
WeekNumber:
(([meetingdate]-(([meetingdate]-Day([meetingdate]-1))-Weekday([meetingdate]-
Day([meetingdate]))))\7)+1
Tell me what you think


Duane Hookom said:
Can you define week number of the month? For instance what values would you
expect for:

May 31, 2005
June 1, 2005
Sept 4, 2005
Oct 2, 2005

What are the rules you apply to get these values?

--
Duane Hookom
MS Access MVP
--

I have a query that returns MeetingDates. I am trying to create a column
that shows the week number of the month. (1-5) for these dates. Any
ideas??
 
Back
Top