Pestomania
Active Member
- Joined
- May 30, 2018
- Messages
- 332
- Office Version
- 365
- Platform
- Windows
Hi! I am trying to use an IIF to determine the day of the week. And then it should return different dates. Here is my problem:
If today is Monday, return Monday - Friday of last week. If today is not Monday, return Monday - Now of this week. Below is the code I have tried using:
If I am making this more difficult than necessary, please let me know.
If today is Monday, return Monday - Friday of last week. If today is not Monday, return Monday - Now of this week. Below is the code I have tried using:
Code:
IIF ( WEEKDAY(NOW())=2, (NOW()-7 AND NOW()-6 AND NOW()-5 AND NOW()-4 AND NOW()-3), (NOW()+8-WEEKDAY(NOW())-6 AND NOW()+8-WEEKDAY(NOW())-5 AND NOW()+8-WEEKDAY(NOW())-4 AND NOW()+8-WEEKDAY(NOW())-3 AND NOW()+8-WEEKDAY(NOW())-2))
If I am making this more difficult than necessary, please let me know.
Last edited: