Querying for next weekday

dark11984

Registered User.
Local time
Today, 22:13
Joined
Mar 3, 2008
Messages
129
In my table i have a column called "del date". I want to run a Query to return only the records that have a delivery date of today and tomorrow(next weekday).
 
Sql for for the query will be as below
Code:
SELECT YourTable.*
FROM YourTable
WHERE (YourTable.[del date])=Date() OR (YourTable.[del date])=Date()+1
 
To run on any day of the week and return the next weekday (Mon - Fri), place this in the criteria cell of your [Del Date] field:
date() or (date() + IIf(WeekDay(date()) > 5, 9 - WeekDay(date()), 1))

HTH - Bob
 

Users who are viewing this thread

Back
Top Bottom