Weekend date

  • Thread starter Thread starter Johanna Gronlund
  • Start date Start 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
 
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.
 
Back
Top