Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to determine the First/Last day of a week

Using Functions in Queries

How to determine the First/Last day of a week

by  PaulBricker  Posted    (Edited  )
This function returns the First, Last or any specified Day of the week as a date value.
In a blank column in the query insert:

FirstDayofWeek:([DateField] - Weekday([DateField]))+ 1

for the first day of the week or:

LastDayofWeek:([DateField] - Weekday([DateField])) + 7

for the last day of the week.

For any other day, just change the integer with the intger value that reprsents the weekday you are looking for.
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top