Forum Discussion

ArchiveUser's avatar
ArchiveUser
Qrew Captain
8 years ago

How to calculate a date for this Friday if date is before Thursday or for the following Friday if date is Thursday or Friday

I want to create a formula date field for client payments when the job completion date is entered. How can I calculate if the [Task Completion Date] is on a Monday, Tuesday, or Wednesday, then the date should be Friday of that same week. If the date is on a Thursday or Friday then the date should be the Friday of the following week. Searched for ideas but couldn't find anything. Any assistance would be much appreciated. Thanks!
  • Try this:
    If(  DayOfWeek([Task Completion Date])=1 or  DayOfWeek([Task Completion Date])=2 or  DayOfWeek([Task Completion Date])=3,  FirstDayOfWeek([Task Completion Date])+Days(5),  FirstDayOfWeek([Task Completion Date])+Days(12)  )
  • Genius Dan! Worked like a charm. Thanks so much!!! I had something similar but was missing the "FirstDayOfWeek" part.