Solved

AccessTable - Edit Dates

Posted on 2009-06-30
1
189 Views
Last Modified: 2013-11-29
I have a table that lists dates. How would I query a second column that shows the Friday for the week each date falls in to?

Assume each week starts on Saturday and ends on Friday.
Assume Table Name: "tblListDates", FieldName: "DateList"

i.e. My table may have the following dates. (In reality there is 500K records spanning from 1998)
   
Date List      New Column I would like (Shows Friday of every week date falls into.)
1/1/09          1/2/09
1/2/09          1/2/09
1/3/09          1/9/09
1/4/09          1/9/09
1/5/09          1/9/09
1/6/09          1/9/09
2/12/09        2/13/09
2/17/09        2/20/09
5/1/09          5/1/09
5/2/09          5/8/09
5/3/09          5/8/09

Notice how in the new column (Second Column) each date is a Friday. This represents the Friday of the week the date in the first column falls into (Assuming every week starts on Saturday and Ends on Friday.)
0
Comment
Question by:ouestque
[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
1 Comment
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 24750216
select DateList,dateadd("d",6-weekday([DateList]),[DateList]) as NewColumn
from tblListDates


0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
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…

696 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