Airtable Cobuilder is here! Learn more about our new no-code app creation feature, powered by AI on the Airtable Academy

# Re: Due Date

Solved
Jump to Solution
1864 3
cancel
Showing results for
Search instead for
Did you mean:
5 - Automation Enthusiast

hi, asking for help,

I made a database of my office documents and i need a formula for due dates that is due on 16 months, however the due dates will correspond to two （2） date fields, ex. date A and date B, the condition is this; if date B is not empty, due date will correspond to date B + 16 months, but if date B is empty, due date will correspond to date A + 16 months.

I hope someone help me, thank you!

2 Solutions

Accepted Solutions
18 - Pluto

Try something like:

``````DATEADD(
IF(
{Date B},
{Date B},
{Date A}
),
16,
"months"
)``````

Link to base

18 - Pluto

Ah hmm, try this?

``````IF(
OR(
{Date A},
{Date B}
),
DATEADD(
IF(
{Date B},
{Date B},
{Date A}
),
16,
"months"
)
)``````
5 Replies 5
18 - Pluto

Try something like:

``````DATEADD(
IF(
{Date B},
{Date B},
{Date A}
),
16,
"months"
)``````

Link to base

5 - Automation Enthusiast

Thank you so much! 🙂

5 - Automation Enthusiast

hi, follow - up question. How to leave the Due Date field blank if either of date A and Date B are empty?

18 - Pluto

Ah hmm, try this?

``````IF(
OR(
{Date A},
{Date B}
),
DATEADD(
IF(
{Date B},
{Date B},
{Date A}
),
16,
"months"
)
)``````
5 - Automation Enthusiast

Thank you so much! 🙂