I have an expression that evaluates to either a 1 or 2 based on today's date:
Code:
=IIf(DatePart('ww',(Date()),5,1) Mod 2>0,1,2)
This gives me an alternating 2 week schedule period for the year starting on a thursday.
Now, I need to return a date based on what week of the schedule period it is (1 or 2) For example, if today is Thursday of a week 1 (day1, week1) I need it to return today's date. If today is Friday of week 1, I need it to return the date of the closest Thursday (yesterday) to today and so on. If today is any day in a week 2, I need it to return the closest date of the week 1 thursday (start of the period). Example, Thursday of week 2 should return date of closest Thursday of week 1. And i need this in a single line switch or iif statement because the date returned will be used in a query as a start date to show hours worked between today and the returned date
TIA for any assistance