Returning Current Week In a Calculated Field

ffejeff224

New member
Local time
Today, 15:01
Joined
Jun 7, 2011
Messages
8
I have a series of queries that I use to populate an excel spreadsheet for a weekly report that I have to send out. I would like to have one of the fields exported be the current week displayed as a range of dates. Presently I was thinking that I could use a calulated field in a make table query then export to excel using a macro, but I can't figure out a way to return the week as a range of dates. For example, if the current date was 8/12/2011 I would like the calculated field to return 8/7/2011-8/13/2011. Is there any way to do this in Access?
 
Hi..

use this criterion in the query..:

between date()-weekday(date())+1 and date()-weekday(date())+7
 
Ty for the help, but I wasn't looking for a criterion. I am not sure I explained myself properly, but I am trying to get an expression to create a calculated field that is the actual range of dates for the current week.
 
jeff, take a little longer with the two date expressions that Taruz has bothered to post for you. If you can't find them, here is one ...
date()-weekday(date())+1
... and here is the other ...
date()-weekday(date())+7
He understood your post perfectly well and provided exactly what you asked for.
Thanks Taruz.
 
I obviously misunderstood, I thought he was saying to use that as a criterion in a field to limit results to only that current week... not returning an actual date. I havn't worked with date fields a lot so I don't really understand what the code is doing. Sorry if I offended.
 
I appreciate your help guys. I ended up having to write a query just to populate both dates for beggining and end of the week then I just concatenated the two dates in the query that I was exporting to excel.
 

Users who are viewing this thread

Back
Top Bottom