I am trying to get a formula to take my number or days and turn them into a "next day of the week"

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • Answered

I have to calculate a due date.

[Date of Sale] - Days([Newspaper - Thurs DDays]) - Days([State - Pub Days])


but how do I make it so it will calculate the next closest Thursday?

Photo of JC Stock

JC Stock

  • 70 Points

Posted 2 years ago

  • 0
  • 1
Photo of Matthew Neil

Matthew Neil

  • 31,478 Points 20k badge 2x thumb
NextDayOfWeek (Date d, Number n)

Description: Returns the first day after the given date d that falls on the weekday n.

n is a number from 0 to 6 with Sunday being 0, Monday being 1, Tuesday being 2, and so on.

Example: NextDayOfWeek([Date Submitted], 2) returns the first Tuesday that follows the Date in the Date Submitted field.

So yours could be:

NextDayOfWeek([Date of Sale] - Days([Newspaper - Thurs DDays]) - Days([State - Pub Days]), 4)