# Due dates formula

• 0
• Question
• Updated 2 years ago
I need to set 4 due dates that will be based on number of days (End Date - Start date), divided by 5 which will make 5 periods of same length. And a due date is the first day of each period except the first one.
• 82 Points

Posted 2 years ago

• 0

Ⲇanom the ultimate (Dan Diebolt), Champion

• 30,074 Points
Try these five formulas:

==========================================================
[Due Date 1] formula:
var Number NumDays = ToDays([End Date] - [Start Date]);
var Number IntDays = Int(\$NumDays / 5);
var Number RemDays = Rem(\$NumDays, 5);
[Start Date] + Days(If(\$RemDays  = 0, 1 * \$IntDays,  1 * (\$IntDays + 1)))
==========================================================
[Due Date 2] formula:
var Number NumDays = ToDays([End Date] - [Start Date]);
var Number IntDays = Int(\$NumDays / 5);
var Number RemDays = Rem(\$NumDays, 5);
[Start Date] + Days(If(\$RemDays  = 0, 2 * \$IntDays,  2 * (\$IntDays + 1)))
==========================================================
[Due Date 3] formula:
var Number NumDays = ToDays([End Date] - [Start Date]);
var Number IntDays = Int(\$NumDays / 5);
var Number RemDays = Rem(\$NumDays, 5);
[Start Date] + Days(If(\$RemDays  = 0, 3 * \$IntDays,  3 * (\$IntDays + 1)))
==========================================================
[Due Date 4] formula:
var Number NumDays = ToDays([End Date] - [Start Date]);
var Number IntDays = Int(\$NumDays / 5);
var Number RemDays = Rem(\$NumDays, 5);
[Start Date] + Days(If(\$RemDays  = 0, 4 * \$IntDays,  4 * (\$IntDays + 1)))
==========================================================
[Due Date 5] formula:
[End Date]
• 82 Points
Thank you sooo much!! I'd been working on it for ages and still couldn't figure out how to do it. Thanks again!