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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
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 |