ChiHam
ChiHam

Reputation: 85

Week Start date from a Date MS Access

I have a field with dates, I will like to run a query that updates another field with the Week Start Date (Sunday). How can I do that ? I am using MS Access.

Upvotes: 1

Views: 4024

Answers (1)

Gord Thompson
Gord Thompson

Reputation: 123409

You should be able to do that with a combination of the DateAdd() and Weekday() functions, as in:

UPDATE theTable SET weekStartDate = DateAdd("d", -Weekday(theDate) + 1, theDate)

Upvotes: 3

Related Questions