A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Calculate "week-ending" date



 
 
Thread Tools Display Modes
  #1  
Old November 22nd, 2005, 11:44 AM posted to microsoft.public.access.queries
external usenet poster
 
Posts: n/a
Default Calculate "week-ending" date

In an Access query, I'd like to have an expression that takes the current day
of the week (Sun through Sat) and returns the date for Saturday (in "Short
Date" format) of that same week. Please advise.
--
Thanks!
Mona-ABE
  #2  
Old November 22nd, 2005, 12:11 PM posted to microsoft.public.access.queries
external usenet poster
 
Posts: n/a
Default Calculate "week-ending" date

One way to approach this would be to get the day number (Sunday = 1, Monday
= 2, ...) of the current date (Date()), subtract that from 7 (days in a
week), then add that many days to the current date (using DateAdd()
function).

Or have I misunderstood?

--
Regards

Jeff Boyce
Office/Access MVP

"Mona-ABE" wrote in message
...
In an Access query, I'd like to have an expression that takes the current

day
of the week (Sun through Sat) and returns the date for Saturday (in "Short
Date" format) of that same week. Please advise.
--
Thanks!
Mona-ABE


  #3  
Old November 22nd, 2005, 12:25 PM posted to microsoft.public.access.queries
external usenet poster
 
Posts: n/a
Default Calculate "week-ending" date

Try something allong the lines of:

DateAdd("d",(7-Weekday([DATE])),[DATE])


"Mona-ABE" wrote in message
...
In an Access query, I'd like to have an expression that takes the current
day
of the week (Sun through Sat) and returns the date for Saturday (in "Short
Date" format) of that same week. Please advise.
--
Thanks!
Mona-ABE



  #4  
Old November 22nd, 2005, 05:15 PM posted to microsoft.public.access.queries
external usenet poster
 
Posts: n/a
Default Calculate "week-ending" date

Thanks so much for the tip...it worked great!!!
--
Thanks!
Mona-ABE


"John Ortt" wrote:

Try something allong the lines of:

DateAdd("d",(7-Weekday([DATE])),[DATE])


"Mona-ABE" wrote in message
...
In an Access query, I'd like to have an expression that takes the current
day
of the week (Sun through Sat) and returns the date for Saturday (in "Short
Date" format) of that same week. Please advise.
--
Thanks!
Mona-ABE




  #5  
Old November 22nd, 2005, 05:15 PM posted to microsoft.public.access.queries
external usenet poster
 
Posts: n/a
Default Calculate "week-ending" date

Thanks so much for the tip...it worked great!!!
--
Thanks!
Mona-ABE


"Jeff Boyce" wrote:

One way to approach this would be to get the day number (Sunday = 1, Monday
= 2, ...) of the current date (Date()), subtract that from 7 (days in a
week), then add that many days to the current date (using DateAdd()
function).

Or have I misunderstood?

--
Regards

Jeff Boyce
Office/Access MVP

"Mona-ABE" wrote in message
...
In an Access query, I'd like to have an expression that takes the current

day
of the week (Sun through Sat) and returns the date for Saturday (in "Short
Date" format) of that same week. Please advise.
--
Thanks!
Mona-ABE



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
calculate no. of years between a date and today's date Sue Worksheet Functions 10 June 14th, 2005 02:56 AM
Calculate a date from days date KS General Discussion 2 May 10th, 2005 12:50 PM
QDE (Quick Date Entry) Norman Harker General Discussion 3 September 3rd, 2004 08:00 AM
Does date fall between two ranges? MR Worksheet Functions 4 January 14th, 2004 04:08 PM
How to calculate 12 months from "Date Added" field Sandi Gauthier Worksheet Functions 2 November 19th, 2003 05:01 PM


All times are GMT +1. The time now is 10:16 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.