Fornula for Date field - Week Ending Sunday

I’m looking to find the week ending date for a particular date field. Example…Status Complete Date is 05/26/2015. I need a formula to display 05/31/2015 in another date field named Week Ending. Sunday would be the week ending date. I’m looking for a formula, I’ve searched this forum and google and didn’t come up with much information. I’ve perused the IBM knowledge base as well. Any assistance would be appreciated. Thank you…

Subject: Fornula for Date field - Week Ending Sunday

@Adjust(DateField; 0; 0; @Modulo(8 - @Weekday(DateField); 7); 0; 0; 0)

It has been covered both here and in the Notes and Domino R4 & R5 forum. (By me on at least two occasions I can remember.) The only reason I’m posting this is because the @Modulo isn’t obvious. You will want to modify the formula to avoid errors when the source date field is empty, of course.

Subject: RE: Fornula for Date field - Week Ending Sunday

Thanks Stan…worked beautifully!

Subject: Well that beats the heck out of my way…

@Modulo…a hidden gem (from a real gem).

Way easier and cleaner than what I’m doing which involves lots of @If and @Replace. Then again, doing it the hard way builds character…that’s my story and I’m sticking with it!

Subject: RE: Well that beats the heck out of my way…

If I recall correctly (and I hope I don’t, 'cause it’s kind of embarrassing in retrospect), I used to use @Select. Then I was visited by the avatar of Andre Guirard in the deep woods of a long, winding thread, and I was enlightened.

Subject: Andre…Gandolf…

Perhaps brothers by another mother? Deep wisdom permeates their souls…

Then again, have you ever seen them both in the same room at the same time??? Could it be???

Subject: @weekday

@Weekday tells you the day of the week for your initial date. Use that to compute the date for Sunday by using @Adjust based on the initial Day of week