Selecting weekdays only

  • Thread starter Thread starter Myles E
  • Start date Start date
M

Myles E

hi, i'm trying to write a query which selects just
weekdays from a sybase table. the query works fine for
days when the day before is a non-weekend day:

date()-1

the sybase table is for the previous day's processing. so
for this to work on monday morning, I need to be able to
query where date()-3. how do i write that in the criteria
section?

thanks,
Myles England
 
You can use the Weekday function, to determine the number of the day.
(You can specify the first day of week. i.e. vbMonday)

So, if you make Monday the first day, you can query for anything less than
6.

i.e. Where Weekday([SomeDate], vbMonday) < 6

--
HTH,

Steve Clark, Access MVP
FMS, Inc.
Professional Solutions Group
http://www.FMSInc.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Is your Access database too slow?
Are you ready to upgrade to SQL Server?
Contact us for optimization and/or upsizing!
http://www.FMSInc.com/consulting
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
Back
Top