How to determine what week of the month.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

What is the formula to figure out what week of the current month?
for example: today is 7/27/05 so it is the week 4. i want my query to say
"week 4"
Thank you!
 
Georgia,

Basically, this is how you do it:
datepart("ww",dte)-datepart("ww",dateserial(year(dte),month(dte),1))

What this does, is work out the week number for the supplied date (dte), and
subtract the week number for the 1st of that month.

But you need to define what constitutes the end of week 1 for dte. For
example, if the month starts on a Wednesday, when does week 1 end?

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
(Currently in Japan)
 

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

Similar Threads


Back
Top