Selecting weekdays only

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
 
M

[MVP] S. Clark

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
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top