Start date

  • Thread starter Thread starter Nelson Medeiros via AccessMonster.com
  • Start date Start date
N

Nelson Medeiros via AccessMonster.com

I currently have a startdate column and I need help on how to create a
formula that looks at all weekend days and return them to friday in this
query. Can someone Help.

Thanks
 
RevStartDate = IIf(Weekday([StartDate], 2)<=5, [StartDate],
[StartDate]-(Weekday([StartDate],2)-5))

When using Monday (i.e., 2) for the StartOfWeek argument, Saturdays returns
6 and Sundays returns 7)
So: If StartDate <= Friday, use StartDate, otherwise subtract 1 or 2 from
StartDate (i.e., use Friday)

HTH,
 
Thanks for replying.

Where would I insert this formula would it be in the criteria? Please help
again.

Thanks
 

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

Back
Top