# How to create a field for Next Date Due

• 0
• Question
• Updated 1 year ago
How do I create a field that calculates a "next due date" based off an initial start date and todays date (in 3 months after start date, in 6 months after start date, in 12 months after start date). I want the field to show the next due date that occurs after todays date.   This is for scheduling medical tests that need to be done at specific intervals after the date of diagnosis.  I'd appreciate any help with this.  Thank you.
• 230 Points

Posted 1 year ago

• 0
• 70,354 Points
Try this

LastDayOfPeriod(Today(), Days(365/12*3), [Reference date]) + Days(1)

The function LastDayOfPeriod is described here
• 230 Points

This would work if my due dates had the same duration interval, however, they are variable.  Every 3 months for 2 yrs, then every 6 months, etc.

After searching through other posted solutions, I created a new field for each of the upcoming due dates [ _ Month testing due], based off my starting date [Date of Program Entry] by using the following example for the [3month testing due date]:

I plan to hide all these fields in my form.

Once all those fields were created, I created another field [Next Due Date] and used the following formula to show the next due date occurring after the month of today's date.

Min(
If([3 Month Testing Due] >= FirstDayOfMonth(Today()), [3 Month Testing Due], null),
If([6 Month Testing Due] >= FirstDayOfMonth(Today()), [6 Month Testing Due], null),
If([9 Month Testing Due] >= FirstDayOfMonth(Today()), [9 Month Testing Due], null),
If([12 Month Testing Due]>= FirstDayOfMonth(Today()), [12 Month Testing Due], null),
If([15 Month Testing Due] >= FirstDayOfMonth(Today()), [15 Month Testing Due], null),
If([18 Month Testing Due] >= FirstDayOfMonth(Today()), [18 Month Testing Due], null),
If([21 Month Testing Due] >= FirstDayOfMonth(Today()), [21 Month Testing Due], null),
If([24 Month Testing Due] >= FirstDayOfMonth(Today()), [24 Month Testing Due], null),
If([30 Month Testing Due] >= FirstDayOfMonth(Today()), [30 Month Testing Due], null),
If([36 Month Testing Due] >= FirstDayOfMonth(Today()), [36 Month Testing Due], null),
If([42 Month Testing Due] >= FirstDayOfMonth(Today()), [42 Month Testing Due], null),
If([48 Month Testing Due] >= FirstDayOfMonth(Today()), [48 Month Testing Due], null),
If([54 Month Testing Due] >= FirstDayOfMonth(Today()), [54 Month Testing Due], null),
If([60 Month Testing Due] >= FirstDayOfMonth(Today()), [60 Month Testing Due], null))

It seems to be working correctly. Maybe there was an easier way?

Thank you, I use your posted solutions frequently.

• 70,354 Points
Ok, thx for the feedback and letting know that you found a solution.