Weekend date

J

Johanna Gronlund

Hello,

I need to filter my query for weekend dates only. Is there an easy way of
doing this?

I was going to do a table on excel with all the dates for the time period
with column determining if they are week or weekend date. However, this is
very time consuming and it would be good to know if there is a formula. I am
not very experienced with formulas in Access so it will need to be spelled
out.

Many thanks in advance,

Johanna
 
J

John W. Vinson/MVP

Johanna Gronlund said:
Hello,

I need to filter my query for weekend dates only. Is there an easy way of
doing this?

I was going to do a table on excel with all the dates for the time period
with column determining if they are week or weekend date. However, this is
very time consuming and it would be good to know if there is a formula. I
am
not very experienced with formulas in Access so it will need to be spelled
out.

Put a calculated field in your query by typing:

DayOfWeek: Weekday([datefield])

On the Criteria line under this field type

IN(1,7)

The Weekday function returns 1 for Sunday, 2 for Monday,..., 7 for Saturday;
the criterion will select just Sundays and Saturdays.
 

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