View Full Version : Date today to end of week


torquay
11-14-2008, 03:43 AM
I am trying to pull records from today to the end of the week, when I try the code below I get everything from this week, can anyone advise me.

DatePart("ww", [ApptDate]) = DatePart("ww", Now()) and Year( [ApptDate]) = Year(Date())

Thanks Kim

namliam
11-14-2008, 04:26 AM
Between date() and date() - weekday(Date(),2) + 7

Date() obviously returns today, weekday for today will return 5.
14-Nov - 5 + 7 = 16-Nov

Happy programming !

torquay
11-14-2008, 05:05 AM
Thank you for your speedy reply.


Works great

Kim

namliam
11-14-2008, 06:18 AM
Working 'magic' with dates is my specialty...

*POOF*
Its weekend !