Apr 06, 2019 04:31 AM
Hello
I’ve four columns in a single one table,
I would find a formula who fill my “date de relance” field with :
I’ve tried this formula :
IF(relance=“pas d’action”,“ok”,IF({date manuelle prévue}!=BLANK(),DATETIME_FORMAT({date manuelle prévue},‘D/M/YYYY’),
DATEADD({date de l’échange},8,‘days’)))
But i’ve a #Error !
“ok” is well returned , it’s working
“date manuelle prévue”, is well returned with the good format ‘D/M/YYYY’
but for adding day to “date de l’échange”, even if field “date de l’échange” is filled or not returns #Error !
I will be very grateful if some of you could help me :slightly_smiling_face:
thanks lot
and enjoy your week end
amélie
Apr 06, 2019 06:11 AM
I was able to fix part of the error by by removing !=BLANK()
from your second IF function. When checking to see if a field is not empty, it’s preferable (and more reliable) to use the shortcut format:
IF({date manuelle prévue}, ...)
…which returns True if {date manuelle prévue}
contains anything.
Doing that got rid of the error, but left the resulting date looking like this:
2019-04-09T00:00:00.000Z
I then wrapped a similar DATETIME_FORMAT around the DATEADD, which gave me this:
9/4/2019
Here’s the full formula:
IF(
relance="pas d’action"
,"ok"
,IF(
{date manuelle prévue},
DATETIME_FORMAT(
{date manuelle prévue},
'D/M/YYYY'
),
DATETIME_FORMAT(
DATEADD(
{date de l’échange},8,'days'
),
'D/M/YYYY'
)
)
)
BTW, you said in your comments that you wanted to add 12 days, but had 8 in the formula, so I left it at 8.