# Formula for Calculated Dates and Set Dates and no dates

Topic Labels: Formulas
1115 2
cancel
Showing results for
Did you mean:
5 - Automation Enthusiast

I have set up a series of tasks. Some of the tasks have a regular due date (DUE DATE), some of the tasks have a due date that is calculated (CALCULATED DUE DATE), and some of the tasks need to be done as soon as possible (AS NEEDED).

I would like to make a formula that says
IF the due date is not empty, return the DUE DATE.
but
if the due date is empty, look to see if the CHECKBOX is checked.
IF the checkbox is checked, return the words “ASAP”
but
if the due date is empty AND the checkbox is not checked,
return the CALCULATED DUE DATE.
As an added bonus, I would like the dates in the final output to be written out in the format “Monday, 3/14/22”.
As an added added bonus it would be cool if those dates could be workdays.

I think this is getting complicated because some values are dates and others are words but I can’t quite figure out.

Attached is an image of what I want to do with what info.

2 Replies 2
10 - Mercury

Hi there! Try something like this…

``````IF({DUE DATE}, DATETIME_FORMAT({DUE DATE}, 'dddd, L'), IF({AS NEEDED}, "ASAP", IF({DATE OF VISIT}, DATETIME_FORMAT(DATEADD({DATE OF VISIT}, {DAY COUNT}, 'days'), 'dddd, L'))))
``````

I hope this helps!

5 - Automation Enthusiast

@AlliAlosa thank you so much for your response. That did not work for me. But someone else helped me and we ended up with the following monstrosity, where the columns are named to be equivalent in my above example:

"Hard Due Date (from Tasks) = “Due Date”
“(Date of Visit (DOV) (from Organization)” = “DATE OF VISIT”
“DAY COUNT (from TASKS 2)” = “DAY COUNT”
and