?
Solved

Finding the beginning date of next 11 weeks including current week in access query

Posted on 2014-10-03
3
Medium Priority
?
209 Views
Last Modified: 2014-10-03
Hi there,
I'm trying to find the begging date of a week for 11 weeks including the current week.

Example now we are on the 40 week of the year and the date for the start of the 40 week is 9/28/2014
I would like to get the beginning date for the next 10 weeks including current weeks start date
I'm able to get current weeks using DateAdd("d",(CInt(Format(Date(),"w"))-1)*-1,Date())   not sure how I can get the next 10 weeks start date. I would appreciate any help.
thanks
0
Comment
Question by:Sivasan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 96

Accepted Solution

by:
Lee W, MVP earned 1500 total points
ID: 40360711
Maybe I'm missing something... but wouldn't you just need to add multiples of 7 to the date for the current week?
0
 

Author Comment

by:Sivasan
ID: 40360726
Yep, my bad, had the answer.
Thank you
0
 
LVL 48

Expert Comment

by:Dale Fye
ID: 40360792
I use a table (tbl_Numbers) for stuff like that.  It only has one field (intNumber) and 10 records (the values 0-9).  With that, I can create a query (qry_Numbers) to generate as many consecutive numbers as I want, like:

SELECT Tens.intNumber * 10 + Ones.intNumber as intNumber
FROM tbl_Numbers as Tens, tbl_Numbers as Ones

With that query you could do something like:

SELECT Dateadd("ww", intNumber, dateadd("d", -weekday(date, vbmonday), date())) as WeekStart
FROM qry_Numbers
WHERE intNumber <= 11
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question