Date question

  • Thread starter Thread starter taft71
  • Start date Start date
T

taft71

I have 2 calculated date field which sometimes end on Saturday or Sunday.
When that happens I would like them to end on the prior Friday. Any help?
 
Well, it always helps to post the calculations. IF you are doing this in the
query without using a user-defined function, then something like the following
may work.


Switch(Weekday(YourCalculatedDate) = 1, YourCalculatedDate-2,
WeekDay(Yourcalculateddate)=7,YourCalculatedDate-1,
True, YourCalculatedDate)
 
Mr. Spencer, my question is very close to this one.

If a due date falls on a Saturday, I want the system to add two days to the
due date, making it due on the following Monday.

If a due date falls on a Sunday, I want the system to add one day to the due
date, making it due on the following Monday.

Can you please tell me how to write this and if I would be writing this in
my query.
 
Back
Top