Skip to main content

I need to use DATETIME_FORMAT two times in my IF formula, otherwise it won’t show the date correcty.




The current formula that I am using is:

IF({Execute day (before/after)}=BLANK(),{PROJECT DEADLINE},DATETIME_FORMAT(DATEADD({PROJECT DEADLINE},{Execute day (before/after)},‘days’),‘D-MMM-YYYY’))


Can’t figure out where I am supposed to add the first DATETIME_FORMAT formula.


Any suggestions would be much appreciated!

Hello and welcome @Frederik_van_Dierme1!


Looking at your formula I believe you are missing the DATETIME_FORMAT() for the Project deadline in the “true” evaluation of your IF() statement.


I believe the formula should look like the following:


IF(
{Execute day (before/after)}=BLANK(),
DATETIME_FORMAT({PROJECT DEADLINE}, ‘D-MMM-YYYY’),
DATETIME_FORMAT(DATEADD({PROJECT DEADLINE},{Execute day (before/after)},‘days’),‘D-MMM-YYYY’)
)

Let me know if I can help provide any more information, and if this helped answer your question please mark it as the solution ✅ .


Reply